A file student.txt contains records in the format: StudentID Name Marks1 Marks2 Marks3 Marks4 Write a program that: (a)(3 Marks) Calculates total…

A file student.txt contains records in the format: StudentID Name Marks1 Marks2 Marks3 Marks4

Write a program that:

(a)(3 Marks) Calculates total and average marks.

(b) (3 Marks) Assigns grades (A+, A, B,C,F). Where,Marks | ≥80 | ≥70 | ≥60 | ≥50 | <50 |

Grade | A+ | A | B | C | <F |

(c) (3 Marks) Displays the top scored three students.

(d) (3 Marks) Displays the subject having the highest average mark.

From the ICB Securities Trading Company Assistant Programmer July 2026 – Written (DU) exam, question 1 of 3.

More from this paper