Cããªããã»ããµã®ãã¯ãå ã§ãä»®å¼æ°ã«ã·ã£ã¼ãè¨å·1åãåç½®ããã¨ããã¼ã¯ã³ãæååã«ãã¦ããããã¨ã¯âãã¡ããâç¥ã£ã¦ã¯ãã¾ãããããããå¼æ°ã¨ãã¦ååãã使ã£ããã¨ãããã¾ãã*1ãååhelloãæåå"hello"ã«ç´ããã¨ãã§ããã ãã®æåååæ¼ç®åã¯ãåãªãååãããªãã¦ãæåååã§ãããã§ãããã¸ã¼ã /* a.c */ #include <stdio.h> #define PRINT_EXPR(expr) \ printf("%s = %d\n", #expr, expr) int main() { PRINT_EXPR(1 + 2); PRINT_EXPR(1 + 2*3); int x = 10; PRINT_EXPR(x); PRINT_EXPR(x*x + x + 1); return 0; } $ gcc a.c $ ./a.exe 1 + 2 = 3 1 +
{{#tags}}- {{label}}
{{/tags}}