fork download
  1. //1. Дана строка из символов, найти кол-во слов начинающихся и кончающихся одной буквой
  2. #include <stdio.h>
  3. #include <string.h>
  4.  
  5. int main()
  6. {
  7. int c = 0, i = 0;
  8. char s[90], symb;
  9. gets_s(s);
  10. if (strlen(s) < 82)
  11. while (i + 1 != '.')
  12. {
  13. symb = s[i];
  14. while ((s[i + 1] != '.') && (s[i + 1] != ' '))
  15. {
  16. i++;
  17. }
  18. c++;
  19. if (s[i + 1] != '.') i += 2;
  20. }
  21. printf_s("%d", c);
  22. return 0;
  23. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:9:2: warning: implicit declaration of function ‘gets_s’; did you mean ‘fgetpos’? [-Wimplicit-function-declaration]
  gets_s(s);
  ^~~~~~
  fgetpos
prog.c:21:2: warning: implicit declaration of function ‘printf_s’; did you mean ‘printf’? [-Wimplicit-function-declaration]
  printf_s("%d", c);
  ^~~~~~~~
  printf
prog.c:8:14: warning: variable ‘symb’ set but not used [-Wunused-but-set-variable]
  char s[90], symb;
              ^~~~
/usr/bin/ld: /home/GkyHuN/ccLYdPqJ.o: in function `main':
prog.c:(.text.startup+0x1c): undefined reference to `gets_s'
/usr/bin/ld: prog.c:(.text.startup+0xa7): undefined reference to `printf_s'
collect2: error: ld returned 1 exit status
stdout
Standard output is empty