You are on page 1of 14

Practice for final exam

(next)

Dr. Tinh
• Suppose you are developing a program to manage students’ marks in
some subjects.
• The information of a student is described in a struct as follows:
struct students {
char name[30];
char[10] class;
float average;
};
• Write the program that has the interface as follows: (5-10 min)
• Please Choose:
• 1. Enter students’ information.
• 2. Print/show information of all students
• 3. Sorting students based on the average.
• 0. Exit
• When the user chooses:
• 0. The program will exit. (0.5 point)
• 1. The program will require the user to prompt information of N
student such as: name, class and mark average. All of the
student’s information will be stored in an array. (1.5 point) ~
(10 min)
• 2. The program will display all student information (each student
information will be display on a line) from the array. (0.5 point) ~
(5-min)
• 3. The array will be sorted descending and display to the output (1
point) ~ (10-min)
Approach 1
Approach 2

You might also like