Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define SIZE 21
- int main(void)
- {
- setlocale(LC_ALL, "Rus");
- char word[SIZE];
- s_gets(word, SIZE);
- printf("Массив записан\n");
- printf("%p %c\n", word, *word);
- res = spaces(word, SIZE);
- printf("\n");
- fputs(res, stdout);
- printf("\n");
- return 0;
- }
- char *spaces(char *st, int n)
- {
- printf("Выполнен вход в space()");
- char *ch;
- int i;
- printf("%c", *st);
- ch = strchr(st, ' ');
- for(i = 0;i < n || st[i] == '\0';i++)
- {
- if(st[i] == ' ')
- {
- ch = st[i];
- }
- }
- return ch;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement