fork download
  1. #include <stdio.h>
  2.  
  3. int pr(void);
  4.  
  5. int main(void) {
  6. int x = pr();
  7. printf(x);
  8. return 0;
  9. }
  10.  
  11. int pr(void) {
  12. int a;
  13. a = 3;
  14. int b;
  15. b = 6;
  16. int c;
  17. c = a+b;
  18. return c;
  19. }
  20.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function 'main':
prog.c:7:9: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Werror=int-conversion]
  printf(x);
         ^
In file included from prog.c:1:0:
/usr/include/stdio.h:362:12: note: expected 'const char * restrict' but argument is of type 'int'
 extern int printf (const char *__restrict __format, ...);
            ^
cc1: all warnings being treated as errors
stdout
Standard output is empty