Code for Program of swapping numbers using pointers in C++ Programming
#include<iostream.h>
#include<conio.h>
void kal(int *a,int *b)
{
int *temp,i;
temp=&i;
*temp=*a;
*a=*b;
*b=*temp;
}
main()
{
clrscr();
int i=5,j=10;
cout<<"Before swapping I = "<<i<<" J = "<<j<<endl;
kal(&i,&j);
cout<<"After swapping I = "<<i<<" J = "<<j<<endl;
}