Question
1. Create a file that contains 3 rows of data of the form: First Name Middle Name Last Name Month Day Year Month Day Year
1. Create a file that contains 3 rows of data of the form: First Name Middle Name Last Name Month Day Year Month Day Year GPA. This file represents student data consisting of first name, middle name, last name, registration month, registration day, registration year, birth month, birth day, birth year, current gpa. ...or you may download the data file inPut.txt. inPut.txt reads: Tsia Brian Smith 9 1 2013 2 27 1994 4.0 Harper Willis Smith 9 2 2013 9 25 1990 3.7 Phelix N Smith 8 27 2013 7 28 1992 3.9 Create a program (including code comments) that: 2. Declares a date structure consisting of month, day, year. 3. Declares a structure containing student data: first name, middle name, last name, gpa, registration date using the date structure previously declared and birth date using the date structure previously declared. 4. Places the function prototypes and structures in a header file (*.h). Include the header file in the main program. 5. Declares an array variable of the student structure that can hold 3 students. 6. Opens the file. Write code to check the file state. If the file fails to open, display a message and exit the program. 7. Write a function that accepts the file pointer and structure array as parameters and reads each row into the structure. 8. Write a function that accepts the array structure as a parameter. Ensure the array cannot be modified in the function. Output the data in the structure using appropriate labels and messages. Ensure the data is readable. 9. Call both functions from main.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started