Program is to swap the two values which are enter by user:
Program is to swap the two values which are enter by user through the function with values changed using pointers
void swap(int *p,int *q);
void main()
 {
 clrscr();
 int a,b;
 cout<<" enter the number ";
 cin>>a;
 cout<<" enter the number ";
 cin>>b;
 swap(&a,&b);
 cout<<" the numbers after the value being changed "<<"\n"<
 }
 
void swap(int *p,int *q)
 {
  int r;
   r=*p;
  *p=*q;
  *q=r;
 }