Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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)
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started