fork download
  1. #include <stdio.h>
  2.  
  3. #define call(f) do { if (f == 0) { printf(#f " returned zero\n"); } } while (0)
  4.  
  5. int foo(int a, int b)
  6. {
  7. printf("%d + %d = %d\n", a, b, a + b);
  8. return a + b;
  9. }
  10.  
  11. int main(void)
  12. {
  13. call(foo(1, 2));
  14. call(foo(-1, 1));
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 10320KB
stdin
Standard input is empty
stdout
1 + 2 = 3
-1 + 1 = 0
foo(-1, 1) returned zero