fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int n = 18;
  5. int s;
  6. s = -14;
  7. int r= 0;
  8. float z = 1.15;
  9. float m;
  10. m = -14.2;
  11. char v = 'chafsg';
  12. double l = 1.541786354762534762453765376253;
  13. printf("l is %d", s);
  14. printf("l is %d", z);
  15. printf("l is %d", v);
  16. printf("l is %d", l)
  17. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:11:11: warning: character constant too long for its type
  char v = 'chafsg';
           ^~~~~~~~
prog.c:11:11: warning: overflow in conversion from ‘int’ to ‘char’ changes value from ‘1634104167’ to ‘103’ [-Woverflow]
prog.c:14:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘double’ [-Wformat=]
  printf("l is %d", z);
               ~^   ~
               %f
prog.c:16:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘double’ [-Wformat=]
  printf("l is %d", l)
               ~^   ~
               %f
prog.c:16:22: error: expected ‘;’ before ‘}’ token
  printf("l is %d", l)
                      ^
                      ;
 }
 ~                     
prog.c:9:8: warning: variable ‘m’ set but not used [-Wunused-but-set-variable]
  float m;
        ^
prog.c:7:6: warning: unused variable ‘r’ [-Wunused-variable]
  int r= 0;
      ^
prog.c:4:6: warning: unused variable ‘n’ [-Wunused-variable]
  int n = 18;
      ^
stdout
Standard output is empty