#include<iostream.h>
#include<conio.h>
int main()
{
clrscr();
int a, b;
void swap(int, int);
a = 10; b = 20;
cout<<"Value of a before function call : "<<a<<endl;
cout<<"Value of b before function call : "<<b<<endl;
swap(a, b);
cout<<"Value of a after function call : "<<a<<endl;
cout<<"Value of b after function call : "<<b<<endl;
getch();
return 0;
}
void swap (int x, int y)
{
int temp;
temp = x;
x = y;
y = temp;
cout<<"Value of a during function : "<<x<<endl;
cout<<"Value of b during function : "<<y<<endl;
}