fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int a, b, i=0, j;
  5. for (i<4;i==0;i++);
  6. {if (i<4);
  7. printf ("oi")
  8. else
  9. printf ("tchau")
  10.  
  11.  
  12. return 0;
  13. }}
  14.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:5:8: warning: statement with no effect [-Wunused-value]
  for (i<4;i==0;i++);
       ~^~
prog.c:5:2: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
  for (i<4;i==0;i++);
  ^~~
prog.c:6:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’
  {if (i<4);
  ^
prog.c:8:2: error: expected ‘;’ before ‘else’
  else
  ^~~~
prog.c:4:17: warning: unused variable ‘j’ [-Wunused-variable]
  int a, b, i=0, j;
                 ^
prog.c:4:9: warning: unused variable ‘b’ [-Wunused-variable]
  int a, b, i=0, j;
         ^
prog.c:4:6: warning: unused variable ‘a’ [-Wunused-variable]
  int a, b, i=0, j;
      ^
stdout
Standard output is empty