RicardasSim

macro printf

Aug 6th, 2019
631
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.22 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. #define TESTING_MACRO(name) \
  5.     printf("Name: " #name "\n")
  6.  
  7. int main()
  8. {
  9.  
  10.     TESTING_MACRO("Veronica");
  11.    
  12.     return 0;
  13. }
  14.  
  15. /*
  16. output:
  17.  
  18. Name: "Veronica"
  19.  
  20. */
Advertisement
Add Comment
Please, Sign In to add comment