Question: Q2 ) File TEST.DAT contains only the FOLLOWING CHARACTERS: (with C language) 1 3 R E EOF TEC 21 DATA STRUCTU Show the letter of

Q2 ) File TEST.DAT contains only the FOLLOWING CHARACTERS: (with C language)

Q2 ) File TEST.DAT contains only the FOLLOWING CHARACTERS: (with C language)

1 3 R E EOF TEC 21 DATA STRUCTU Show the letter of the alphabet that the ch indicates after executing the given instructions. FILE *fp; char ch; fp = fopen("TEST.DAT","rb+"); fseek(fp,-2,SEEK_END); ch = getc(fp); printf(" \t %c",ch); fseek(fp,-5, SEEK_CUR); ch = gete(fp); printf(" \t%c",ch); ch = getcifp); printf(" \t %c",ch); fseek(fp, OL, SEEK_SET); ch = getc(fp); printf(" \t %c",ch); fseek(fp, 6L, SEEK_CUR); ch = getc(fp); printf(" \t %c",ch); ch = getc(fp); printf(" \t %c",ch); fseek(fp,-2,SEEK_CUR); ch = getc(fp); printf(" \t %c",ch); fseek(fp,4L, SEEK_CUR); ch = getc(fp); printf(" \t %c",ch); fseek(fp,-1L,SEEK_CUR); ch = getc(fp); printf(" \t %c",ch); fclose(fp)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!