RicardasSim

define

Dec 23rd, 2019
698
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. #define VALUE_1 1
  5. #define VALUE_2 2
  6. #define VALUE_3 VALUE_1 + VALUE_2
  7. #define VALUE_4 (VALUE_1 + VALUE_2)
  8.  
  9. int main()
  10. {
  11.  
  12.     // 1 + 2 * 4
  13.     printf("%d\n", VALUE_3 * 4 );
  14.  
  15.     // (1 + 2) * 4
  16.     printf("%d\n", VALUE_4 * 4 );
  17.  
  18.     return 0;
  19. }
  20.  
  21. /*
  22. output:
  23.  
  24. 9
  25. 12
  26.  
  27. */
Advertisement
Add Comment
Please, Sign In to add comment