Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(a) Write a program that will prompt a user to enter fifty (50)students informat

ID: 3618313 • Letter: #

Question

(a) Write a program that will prompt a user to enter fifty (50)students information, which
will be written to a file called studentsinfo.txt. The filecontains students’ name, age and
final grade. This file should store fifty (50) students.
                                                                                                                  (10 marks)

(b) Write a program that will read from a file studentsinfo.txt andfind the average of the
class.
                                                                                                                  (15 marks)
[Total 25 marks]

Explanation / Answer

please rate - thanks next time 2 posts for 2 questions #include #include int main() { FILE *file; int i,age,grade,num=50,n,sum=0; char name[10]; file = fopen("studentsinfo.txt","r");      if(file == NULL)         {printf("Error openingmyFirstFile! ");          return 0;         } for(i=0;i