Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <ctype.h>
- int main(void)
- {
- FILE *f;
- f = fopen("test.txt", "r+");
- if (f == NULL)
- {
- printf("File Error);
- }
- else
- {
- int c;
- c = 0;
- while ((c = fgetc(f)) != EOF)
- {
- if (c == ' ') // или if ( isspace(c) )
- // заменить на " _ "
- putchar(c);
- }
- }
- fclose(f);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement