fork download
  1. // declaration
  2. void func(void);
  3.  
  4. int main()
  5. {
  6. int ar[] = { 1, 2, 3 };
  7. func(34); // call with parameter
  8. return 1;
  9. }
  10.  
  11. void func(void) // no parameters
  12. {
  13. printf("func()");
  14. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:7:5: error: too many arguments to function ‘func’
     func(34); // call with parameter
     ^
prog.c:2:6: note: declared here
 void func(void);
      ^
prog.c:6:9: warning: unused variable ‘ar’ [-Wunused-variable]
     int ar[] = { 1, 2, 3 };
         ^
prog.c: In function ‘func’:
prog.c:13:4: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
    printf("func()");
    ^
prog.c:13:4: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
stdout
Standard output is empty