fork download
  1. #include<stdio.h>
  2.  
  3. #define DP(xxx) debug_print(__LINE__,(xxx))
  4. char sss[1111];
  5. void debug_print(int ln, char *s)
  6. {
  7. printf("\n%d行目:%s", ln, s);
  8. }
  9.  
  10. int main(void)
  11. {
  12. sss[0]=0;DP(sss);
  13. int a = 10;
  14. sprintf(sss, "a = %d", a);DP(sss);
  15. int b = 20;
  16. sprintf(sss, "b = %d", b);DP(sss);
  17. int c;
  18. sprintf(sss, "c = %d", c);DP(sss);
  19. c = a + b;
  20. sprintf(sss, "c = %d", c);DP(sss);
  21. printf("c = %d\n", c);
  22. sss[0]=0;DP(sss);
  23. return 0;
  24. sss[0]=0;DP(sss);
  25. }
  26.  
Success #stdin #stdout 0s 1792KB
stdin






stdout
13行目:
15行目:a = 10
17行目:b = 20
19行目:c = 0
21行目:c = 30c = 30

23行目: