1.What is the difference between the statements rewind(fp); and fseek(fp,0L,0);?
2. What does the following statement mean? FILE(*p) (void) 3 .What does the following statement do? while ( (c = getchar( ) != EOF ) putc(c, fl ); 4. What does the following statement do? while ( (m = getw(fl ) ) != EOF) printf(“%5d”, m);
5. What does the following segment do?
. . . .
for (i = 1; i <= 5;=”” i++=””>
fscanf(stdin, “%s”, name);
fprintf(fp, “%s”, name);
. . . .
6. What is the purpose of the following functions?
(a) feof ()
(b) ferror ( )
7. Give examples of using feof and ferror in a program15. Can we read from a fi le and write to the same file without resetting the file pointer? If not, why?