swap to number

Ziaur Rahman's Avatar, Join Date: Oct 2006
Go4Expert Member
Code:
#include<stdio.h>
#include<conio.h>
#define SWAPE(x,y) int t;t=x;x=y;y=t;
main()
{
int a,b;

Printf("\n Enter two number");
scanf("%d%d",&a,&b);
Printf("\n Before swaping the Value of a=%d and b=%d",a,b);
SWAPE(a,b);
printf("\n After swap value of a=%d and b=%d",a,b);
return 0;
}

Last edited by shabbir; 26Oct2006 at 19:40.. Reason: Code formating.
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Duplicate of Swap two variables using macro article. Thread closed.