fork(3) download
  1. #include <stdio.h>
  2. /* Упражнение 1.13 */
  3.  
  4. main()
  5. {
  6. int c, i, nword;
  7. nword = i = 0;
  8. while ((c = getchar()) != EOF)
  9. if (c != ' ' || c != '\n' || c != '/t')
  10. ++nword;
  11. else
  12. {
  13. for (i = 0; i == nword; ++i)
  14. printf('_');
  15. else
  16. {
  17. printf('/n');
  18. i = 0;
  19. nword = 0;
  20. }
  21. }
  22. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:4:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 main()
 ^~~~
prog.c: In function ‘main’:
prog.c:9:37: warning: multi-character character constant [-Wmultichar]
   if (c != ' ' || c != '\n' || c != '/t')
                                     ^~~~
prog.c:14:9: warning: passing argument 1 of ‘printf’ makes pointer from integer without a cast [-Wint-conversion]
  printf('_');
         ^~~
In file included from prog.c:1:0:
/usr/include/stdio.h:364:12: note: expected ‘const char * restrict’ but argument is of type ‘int’
 extern int printf (const char *__restrict __format, ...);
            ^~~~~~
prog.c:15:1: error: ‘else’ without a previous ‘if’
 else
 ^~~~
prog.c:17:10: warning: multi-character character constant [-Wmultichar]
   printf('/n');
          ^~~~
prog.c:17:10: warning: passing argument 1 of ‘printf’ makes pointer from integer without a cast [-Wint-conversion]
In file included from prog.c:1:0:
/usr/include/stdio.h:364:12: note: expected ‘const char * restrict’ but argument is of type ‘int’
 extern int printf (const char *__restrict __format, ...);
            ^~~~~~
stdout
Standard output is empty