Open Ended Lab
Open Ended Lab
Theory:
This C++ program uses a 2-dimensional array to store student records. It provides options to
add, update, delete, clear, and display records. The program maintains the number of
records using the variable numOfStudents. Functions are used to perform operations on the
records. The main menu presents choices to the user, and based on the selection, the
program executes the corresponding operation. The program allows efficient management
of student records.
Methodology:
This C++ program allows you to create a student records system using a 2-dimensional
array. It provides options to add, update, delete, clear, and display student records. The
program can store up to 100 student records, each consisting of 4 fields: ID, Name,GPA and
Age.
The program starts by presenting a menu of options to the user:
1. Add Student Record: Allows you to add a new student record by entering the ID,
Name, and Age of the student.
2. Clear Student Records: Clears all the existing student records from the array.
3. Update Student Record: Lets you update the information of a specific student record
by providing the index of the record.
4. Delete Student Record: Deletes a specific student record by providing the index of
the record.
5. Display Student Records: Shows all the stored student records with their
corresponding ID, Name, and Age.
6. Exit: Terminates the program.
You can choose an option by entering the corresponding number. The program validates the
input and performs the selected operation accordingly.
This program helps you manage student records efficiently, allowing you to add, update,
and delete records as needed.
1
Lab 13 Roll no 023
Observation:
The provided C++ program allows the user to manage student records using a 2-dimensional
array and functions. It presents a menu with options to add, update, delete, clear, and
display records. The program efficiently handles operations on the records and provides
feedback to the user
Source code:
2
Lab 13 Roll no 023
3
Lab 13 Roll no 023
Output:
Lab 13 Roll no 023
Adding student record:
Adding records:
5
Lab 13 Roll no 023
Delete records:
6
Lab 13 Roll no 023