SWAPING BETWEEN TWO NUMBER

WRITE A C PROGRAM TO SWAP TWO NUMBER.
#include<stdio.h>
int main(){
    int a=5,b=10,c;
printf("Before swapping :::");
printf("a=%d",a);
printf("b=%d",b); 
c=a;
a=b;
b=c;
printf("After swap element");
printf("a=%d",a);
printf("b=%d",b);
 
    return 0;
}
 

No comments:

Post a Comment