fork download
  1. int main(void) {
  2. FILE *f;
  3. f = fopen("file","wb");
  4. printf("%d",f != NULL);
  5. fclose(f);
  6. return 0;
  7. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:2:9: error: unknown type name ‘FILE’
         FILE *f;
         ^~~~
prog.c:3:13: warning: implicit declaration of function ‘fopen’ [-Wimplicit-function-declaration]
         f = fopen("file","wb");
             ^~~~~
prog.c:3:11: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
         f = fopen("file","wb");
           ^
prog.c:4:9: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
         printf("%d",f != NULL);
         ^~~~~~
prog.c:4:9: warning: incompatible implicit declaration of built-in function ‘printf’
prog.c:4:9: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
prog.c:4:26: error: ‘NULL’ undeclared (first use in this function)
         printf("%d",f != NULL);
                          ^~~~
prog.c:4:26: note: each undeclared identifier is reported only once for each function it appears in
prog.c:5:9: warning: implicit declaration of function ‘fclose’ [-Wimplicit-function-declaration]
         fclose(f);
         ^~~~~~
stdout
Standard output is empty