fork download
  1. #include <stdio.h>
  2.  
  3. void foo (void)
  4. {
  5. printf("In foo() function\n");
  6. }
  7.  
  8. void bar (void)
  9. {
  10. printf("In bar() function\n");
  11. return foo(); // Note this return statement.
  12. }
  13.  
  14. int main (void)
  15. {
  16. bar();
  17. return 0;
  18. }
  19.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘bar’:
prog.c:11:16: error: ISO C forbids ‘return’ with expression, in function returning void [-Werror=pedantic]
         return foo(); // Note this return statement.
                ^~~~~
prog.c:8:6: note: declared here
 void bar (void)
      ^~~
cc1: all warnings being treated as errors
stdout
Standard output is empty