Question: This program should ask the user how many students they wish to enter, up to 10. If a user enters a number less than 1
This program should ask the user how many students they wish to enter, up to 10. If a user enters a number less than 1 or greater than 10, the program should keep asking the user the number of students until the number is between 1 and 10. Once this information is known, the program should proceed to ask for each students first name, last name, age, and grade. Once all the student information has been entered by the user, the program should output all the student information to a file called students.txt. For each student entered, this file should contain 4 lines of information. The first line should be the first name. The second line should be the last name. The third line should be the age. The fourth line should be the grade.
Specific Implementation Requirements:
1.An array of structs should be used to store the students in memory. The structs should each contain two character arrays (for the first and last name), one integer (for the age), and one float or double (for the grade).
2.The code which writes the data to the output file should not be in main.
3.All code must be valid C for Visual Studios. No C++.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
