You are on page 1of 2

#include<stdio.

h>
#include<conio.h>
void swap(int*,int*)
main()
{
int a,b;
clrscr();
printf("enter the value of a,b");
scanf("%d %d %d,&a,&b");
if(a!=b)
swap(&a,&b);
getch();
}
void swap(int*c,int*d)
{
int t;
t=*c;
*c=*d;
*d=t;
printf("The swapped.....%d %d",*c,*d);
}

enter the value of a,b
46
23
The swapped.....23 46

You might also like