Write a program for swapping of a number

Write a program for swapping of a number

 

#include<stdio.h>

#include<conio.h>

void main()

{

Int a=10, b=20,c;

Printf(“Before Swaping “);

Printf(“a=%d,b=%d”,a,b);

c=a;

a=b;

b=c;

Printf(“After Swaping”);

Printf(“a=%d,b=%d”,a,b”);

}

 

===============================================

Output:

 

Before Swaping

a=10,b=20

After Swaping

a=20,b=10


Comments