fork(10) download
  1. main()
  2. {
  3. int var1=12, var2=35;
  4. printf(ā€œ%dā€,max(var1,var2));
  5. } int max(int x, int y)
  6. {
  7. x>y? return x: return y;
  8. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:1:1: warning: return type defaults to ‘int’ [-Wreturn-type]
 main()
 ^
prog.c: In function ‘main’:
prog.c:4:1: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
 printf(“%d”,max(var1,var2));
 ^
prog.c:4:1: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
prog.c:4:1: error: stray ‘\342’ in program
prog.c:4:1: error: stray ‘\200’ in program
prog.c:4:1: error: stray ‘\234’ in program
prog.c:4:11: error: expected expression before ‘%’ token
 printf(“%d”,max(var1,var2));
           ^
prog.c:4:11: error: stray ‘\342’ in program
prog.c:4:11: error: stray ‘\200’ in program
prog.c:4:11: error: stray ‘\235’ in program
prog.c:3:14: warning: unused variable ‘var2’ [-Wunused-variable]
 int var1=12, var2=35;
              ^
prog.c:3:5: warning: unused variable ‘var1’ [-Wunused-variable]
 int var1=12, var2=35;
     ^
prog.c: In function ‘max’:
prog.c:7:6: error: expected expression before ‘return’
 x>y? return x: return y;
      ^
prog.c: In function ‘main’:
prog.c:5:1: warning: control reaches end of non-void function [-Wreturn-type]
 } int max(int x, int y)
 ^
prog.c: In function ‘max’:
prog.c:8:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
stdout
Standard output is empty