fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(void)
  5. {
  6. char str[1000];
  7. int i, len;
  8. gets(str) // DO NOT USE THIS!
  9. len = strlen(str);
  10. for(i=len-1; i>=0; i--) printf("%c",str[i]);
  11. return 0;
  12. }
Compilation error #stdin compilation error #stdout 0s 2296KB
stdin
ABCDEFGHIJK
compilation info
prog.c: In function ‘main’:
prog.c:8:5: warning: ‘gets’ is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
     gets(str)   // DO NOT USE THIS!
     ^
prog.c:9:5: error: expected ‘;’ before ‘len’
     len = strlen(str);
     ^
stdout
Standard output is empty