#include
#include
main()
{
clrscr();
int a=10,b=20;
void swapr(int*,int*);
clrscr();
printf("\nEnter The Vale Of A & B:=");
scanf("%d%d",&a,&b);
printf("\n\t A=%d",a);
printf("\n\t B=%d",b);
swapr(a,b);
printf("\n\n\tAfter Sweping The Value");
printf("\n\n\t A=%d",a);
printf("\n\t B=%d",b);
getch();
}
void swapr(int,int)
int *x,*y;
{
int *z=0;
*z=*x;
*x=*y;
*y=*z;
}
No comments:
Post a Comment