#include<iostream.h>
#include<conio.h>
void swap(int *a,int *b)
void main()
{
int a,b;
clrscr();
cout<<"enter two numbers";
cin>>a>>b;
swap(&a,&b)
cout<<"\n"<<a<<b;
getch();
}
void swap(int *c,int *c)
{
int temp;
temp=*c;
*c=*d;
*d=temp;
cout<<"\n"<<*c<<*d;
}
No comments:
Post a Comment