Displaying ./code/sternflCode/g.c#include<stdio.h>
int c;
int fp=0;
int fp1, fp2;
int main() {
printf("location? ");
scanf("%d", &fp1);
fp2=fp1+20;
fp1 -=20;
FILE *f = fopen("/u1/junk/shakespeare.txt", "r");
while( (c=fgetc(f))!=EOF) {
fp++;
if (fp>=fp1)
printf("%c", c);
if (fp>fp2) {
printf("\n");
return 0;
}
}
}
|