#include<stdio.h>
#include<conio.h>
void main()
{
int
a,b,*p,*q,t;
clrscr();
printf("Enter
the values of A and B: ");
scanf("%d%d",&a,&b);
printf("\nA=%d\nB=%d",a,b);
p=&a;
q=&b;
t=*p;
*p=*q;
*q=t;
printf("\n\nSwapped
numbers \n");
printf("\nA=%d\nB=%d",a,b);
getch();
}
OutPut
---------
Enter the values of A and B: 2 5
A=8
B=3
Swapped numbers
A=3
B=8