Question: (C++) Nested Structures Code w./Functions Save your program as Lab12-1-YourLastName.cpp) A local university would like to hire you to write a C++ program that stores
Save your program as Lab12-1-YourLastName.cpp) A local university would like to hire you to write a C++ program that stores the home address and current college address for their students and displays this information in a report a. Address: Specify a structure named Address to store the street address, the city/state, and the zip code You will use this structure as the data type for the required addresses in the StudentAddress structure. (See lecture notes concerning a "structure within a structure" or P. 613 Nested Structures") a. Specify a structure named StudentAddress to store the following data for each student: Name 2. Home Address. (Use the structure data type Address. Refer to Nested Structures.) 3. College Address. (Use the structure data type Address. Refer to Nested Structures.) b. Specify a one-dimensional array to store the student address records. Set the maximum number of student records to 50 (the school can only accommodate 50 students each school year), but let the user specify how many student records need to be entered. C. Use main() as your driver function. The program does not need to be repeatable d. Write appropriate functions that main calls to accomplish the following tasks: l. Read the number of students in the school. 2. Read and store the name and required addresses for each student. 3. Display each student's name and both addresses. Sample Input Number of students (must be a positive number less than or equal to 50)- 3 Please enter the information for student 1 Name: Mary Jones Home Address Street Address: 45 Ash City, State: Morrilton, AR Zip Code: 72110 College Address: Street Address: 32 Elm City, State: Conway, AR Zip Code: 72034
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
