Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main() {
- FILE *f, *g;
- char c;
- f = fopen("text.txt","r");
- g = fopen("text2.txt", "w");
- while (fscanf(f, "%c", &c) != EOF)
- if (c != ' ' && c != '\n')
- fprintf(g, "%c", c);
- fclose(f);
- fclose(g);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment