Answered step by step
Verified Expert Solution
Question
1 Approved Answer
write in c++ This lab will exercise your understanding of some of the concepts covered in Chapter 9: arrays, structures 1. Create a file that
write in c++
This lab will exercise your understanding of some of the concepts covered in Chapter 9: arrays, structures 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. Create a program 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