void main()
{
int x,y,t,s;
cout<<"Enter x value";
cin>>x;
cout<<"Enter y value";
cin>>y;
t=x;
x=y;
y=t;
cout<<"The swapping of 2 no is:";
cout<<x<<" "<<y;
cin>>s;
}
void swap(int x,int y);
void main()
{
int x,y,t,s;
cout<<"Enter x value";
cin>>x;
cout<<"Enter y value";
cin>>y;
swap(x,y);
cout<<"The swapping of 2 no is:";
cout<<x<<" "<<y;
cin>>s;
}
void swap(int x,int y)
{
int t;
t=x;
x=y;
y=t;
}
void swap(int &x,int &y);
void main()
{
int x,y,t,s;
cout<<"Enter x value";
cin>>x;
cout<<"Enter y value";
cin>>y;
swap(x,y);
cout<<"The swapping of 2 no is:";
cout<<x<<" "<<y;
cin>>s;
}
void swap(int &x,int &y)
{
int t;
t=x;
x=y;
y=t;
}
void swap(int *x,int *y);
void main()
{
int x,y,t,s;
cout<<"Enter x value";
cin>>x;
cout<<"Enter y value";
cin>>y;
swap(&x,&y);
cout<<"The swapping of 2 no is:";
cout<<x<<" "<<y;
cin>>s;
}
void swap(int *x,int *y)
{
int t;
t=*x;
*x=*y;
*y=t;
}