Question: Drill 1 Exercise 1 . Write a program that will declare a Student structure datatype ( shown below ) . The program will ask the

Drill 1 Exercise
1. Write a program that will declare a Student structure datatype (shown below). The program will
ask the user for 10 records of type Student. The program will have the following Menu Items
that the user can execute:
*******MENU*************************
1. SEARCH
2. EDIT a Record
3. SORT the Array of Record
4. QUIT
CHOICE:
**************************************
Search Menu Item: This will ask the user for a Surname of a student, and output the record of
student/s that equals to the query surname
Edit a Record Menu Item: This will also ask for Student Number(Unique Identifier), if the
Student Number is present in the array of records, the user will be ask to edit all the information
about that particular record.
Sort the Array of Record Menu Item: This will Sort the Array of Records based on the Surname.
This will also trigger the program to output all the records and information for each record.
OUIT Menu Item: This will Exit the Program.
NOTE: For this program exercise, use dynamic memory allocation in declaring the array of
records. You need to use pointer notation in accessing the array of records. Using pointer
arithmetic is optional.
struct Student
{
char studentNumber[20];
char Fname[30];
char Sname[30];
char gender[10];
};
Questions
1. How do you allocate and deallocate memory locations in C++
2. What is a dynamic memory allocation?
3. What are the advantages and disadvantages of dynamic memory
allocation?
Discussion of Experiment (Handwritten in Engineering Lettering)
Conclusion (Handwritten in Engineering Lettering)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!