lolamontes69

K+R Exercise4_14

Sep 7th, 2014
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. #define swap(t,x,y) {  t _z;\
  4.                       _z = x;\
  5.                        x = y;\
  6.                        y = _z;}
  7.  
  8. /* Print the input line */
  9. int main()
  10. {
  11.     int x=5;
  12.     int y=6;
  13.     swap(int,x,y);
  14.     printf("x = %d\ny = %d\n",x,y);
  15.     return(0);
  16. }
Advertisement
Add Comment
Please, Sign In to add comment