#include<stdio.h> #include<conio.h> void main() { int a,b,c; clrscr(); printf("Enter value of a and b"); scanf("%d%d",&a,&b); c=a; a=b; b=c; printf("after swapping a=%d\tb=%d",a,b); getch(); }Output:
Enter value of a and b : 5 7
after swapping:
a=7
b=5
0 comments:
Post a Comment