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() {
- char c;
- int i=-1, ar=0, sb=0, se, fl=0, j;
- FILE *f;
- f = fopen("in.txt","r");
- if (!f) {printf("Erro occuring opening file"); return 1; }
- while(!feof(f)) {
- i++;
- c = fgetc(f);
- if (!isalpha(c) && !fl) continue; else {fl=1;sb=i;}
- if (c == '!' || c == '?' || c == '.') {
- se = i;
- for(j=sb;j<se;j++) {
- fseek(f,j,0);
- c = fgetc(f);
- printf("%c",c);
- }
- fseek(f,i,0);
- sb = se + 2;
- }
- }
- fclose(f);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement