#include<iostream.h>
#include<conio.h>
void swap1(int &a,int &b);
void swap2(int *a,int *b);
void cube1(int &x);
void cube2(int *x);
void main()
{
clrscr();
int x=2,y=3;
swap1(x,y);
cout<<"\n\n\n\n\t\t\tx : "<<x;
cout<<"\n\t\t\ty : "<<y;
swap2(&x,&y);
cout<<"\n\t\t\tx : "<<x;
cout<<"\n\t\t\ty : "<<y;
cube1(x);
cout<<"\n\t\t\tCube of x : "<<x;
cube2(&y);
cout<<"\n\t\t\tCube of y : "<<y;
getch();
}
void swap1(int &a,int &b)
{
int temp=a;
a=b;
b=temp;
}
void swap2(int *a,int *b)
{
int temp=*a;
*a=*b;
*b=temp;
}
void cube1(int &x)
{
x=x*x*x;
}
void cube2(int *x)
{
*x=(*x)*(*x)*(*x);
}