fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(void) {
  5. int i;
  6. char msg [] = "c-this is cool"
  7. for (i = 0; i < strlen (msg); i++)
  8. {
  9. putchar (msg [i]);
  10. }
  11. putchar ('\n');
  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:7:1: error: expected ‘,’ or ‘;’ before ‘for’
 for (i = 0; i < strlen (msg); i++)
 ^~~
prog.c:7:15: warning: statement with no effect [-Wunused-value]
 for (i = 0; i < strlen (msg); i++)
             ~~^~~~~~~~~~~~~~
prog.c:7:34: error: expected ‘;’ before ‘)’ token
 for (i = 0; i < strlen (msg); i++)
                                  ^
prog.c:7:34: error: expected statement before ‘)’ token
stdout
Standard output is empty