fork download
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3.  
  4. #ifndef NDEBUG
  5. # define my_assert(X) \
  6.   do { \
  7.   if ( (X) ) { } \
  8.   else { \
  9.   fprintf(stderr, "Failed assert(%s) in line %s:%d!\n", #X, __FILE__, __LINE__); \
  10.   abort(); \
  11.   } \
  12.   } while (0)
  13. #else
  14. # define my_assert(X) \
  15.   do { \
  16.   (void) (X); \
  17.   } while (0)
  18. #endif
  19.  
  20. int main(void) {
  21. char c = getc(stdin);
  22. my_assert (c == 'a');
  23. return 0;
  24. }
Runtime error #stdin #stdout 0.01s 2724KB
stdin
Standard input is empty
stdout
Standard output is empty