Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Icdt 88 2nd International Conference On Database Theory Bruges Belgium August 31 September 2 1988 Proceedings Lncs 326

Authors: Marc Gyssens ,Jan Paredaens ,Dirk Van Gucht

1st Edition

3540501711, 978-3540501718

More Books

Students also viewed these Databases questions