Write a macro for swapping integers.

Showing Answers 1 - 2 of 2 Answers

Rabiammal

  • Sep 17th, 2005
 

main(){ int a,b;scanf("%d,%d"a,b); a^=b;b^=a;a^=b;printf("The values after swap is %d %d",a,b);}

  Was this answer useful?  Yes

Ashutosh

  • Nov 7th, 2005
 

#define INTSWAP (((a) + (b)) - ((b) = (a)))

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions