Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   swap to number (http://www.go4expert.com/forums/swap-to-number-t1734/)

Ziaur Rahman 26Oct2006 18:53

swap to number
 
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;
}


shabbir 26Oct2006 19:41

Re: swap to number
 
Duplicate of Swap two variables using macro article. Thread closed.


All times are GMT +5.5. The time now is 17:15.