Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
- int main (int argc, char *argv[])
- {
- FILE *entrada;
- FILE *saida;
- char str[1000];
- char *new;
- entrada = fopen(argv[1], "r");
- fgets(str,sizeof(str),entrada);
- new = strtok(str, " ,.;:()[]*?!-/\t\"");
- saida = fopen(argv[2], "w");
- fprintf(saida,"%s",new);
- while (new != NULL)
- {
- new = strtok(NULL, " ,.;:()[]*?!-/\t\"");
- fprintf(saida, "\n");
- fprintf(saida, "%s", new);
- }
- fclose(entrada);
- fclose(saida);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement