Last active
August 29, 2015 14:19
-
-
Save K-atc/534184063aa02bace74b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #define SHARP_OP_TEST(expr) (printf("#expr = %s, expr = %d\n", #expr, (expr)) ) | |
| #define var(i) printf("var" #i " = %d\n" , var ## i) | |
| #define CONBINE(a, b) (printf("%s\n", a##b)) | |
| int main(void){ | |
| const char test[] = "This is test"; | |
| int var1 = 10; | |
| SHARP_OP_TEST(1+2); | |
| var(1); | |
| CONBINE(te,st); | |
| return 0; | |
| } | |
| // outputs | |
| // #expr = 1+2, expr = 3 | |
| // var1 = 10 | |
| // This is test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment