Question: 12- question Consider the following piece of code that opens a file with file pointer fp, in this file student name, surname and grade is

12- question Consider the following piece of code that opens a file with file pointer fp, in this file student name, surname and grade is stored in each line of this file, this code aims to read each line from the file and print them on the screen; while (!feof(fp)) { printf("- %s %s %d ", name, surname, grade); Assume the file has already been opened with file pointer fp, and all the rest of the variables have already been declared. Choose the correct statement for missing part. a) fscanf(fp,"%s %s %d ", name, surname, &grade); b) fscanf(fp,"%s %s %d ", &name, &surname, &grade); c) fscanf(fp,"%s %s %d ", name, surname, ade); d) fscanf(fp,"%s %s %d ", &name, &surname, &grade); correct answer: a b) correct answer: b c) O correct answer: correct answer:d
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
