Program:- #include <stdio.h> void main() { int a,b,c; printf("Enter two integers\n"); scanf("%d%d", &a, &b); printf("Before Swapping\nA = %d\nB = %d\n", a,b); c = a; a = b; b = c; printf("After Swapping\nA = %d\nB = %d\n", a,b); } Output:-
No comments:
Post a Comment