#include<stdio.h>//header file
#include<conio.h>//header file
void main() //starting of the main() function
{
int *p,*p1,a,b,temp; //declaration of the variables
clrscr();
printf("program to swap the values using pointers");
printf("\n\n\n\t\t------------INPUT-------------");
printf("\n\nenter any two values");
scanf("%d%d",&a,&b); //taking input from the user
p=&a;
p1=&b;
temp=*p;
*p=*p1;
*p1=temp;
printf("\n\n\n\t\t------------OUTPUT------------");
printf("\n\nthe swapped values are=%d %d",a,b); //printing output
getch();
}