#include<iostream.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
void swap(int *,int *);
cout<<"enter the value of a and b ";
cin>>a>>b;
swap(&a,&b);
cout<<"the value of a is "<<a<<" and b is "<<b;
getch();
}
void swap(int *c,int *d)
{
int a;
a=*c;
*c=*d;
*d=a;
}
#include<conio.h>
void main()
{
int a,b;
clrscr();
void swap(int *,int *);
cout<<"enter the value of a and b ";
cin>>a>>b;
swap(&a,&b);
cout<<"the value of a is "<<a<<" and b is "<<b;
getch();
}
void swap(int *c,int *d)
{
int a;
a=*c;
*c=*d;
*d=a;
}
No comments:
Post a Comment