fork download
  1. int main(){
  2. display();
  3. return 0;
  4. }
  5.  
  6.  
  7.  
  8. void display(){
  9. printf("Why am I compiling successfully?");
  10. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
cc1: warnings being treated as errors
prog.c: In function ‘main’:
prog.c:2: error: implicit declaration of function ‘display’
prog.c: At top level:
prog.c:8: error: conflicting types for ‘display’
prog.c:2: error: previous implicit declaration of ‘display’ was here
prog.c: In function ‘display’:
prog.c:9: error: implicit declaration of function ‘printf’
prog.c:9: error: incompatible implicit declaration of built-in function ‘printf’
stdout
Standard output is empty