0% found this document useful (0 votes)
231 views7 pages

Open Ended Lab

The document describes a C++ program that uses a 2D array and functions to manage student records. It allows the user to add, update, delete, clear, and display up to 100 student records, each with an ID, name, GPA, and age. The main menu offers these options. Based on the user's selection, the program performs the corresponding operation on the records and provides feedback. The code and sample output are included.

Uploaded by

aleemabdullah96
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
231 views7 pages

Open Ended Lab

The document describes a C++ program that uses a 2D array and functions to manage student records. It allows the user to add, update, delete, clear, and display up to 100 student records, each with an ID, name, GPA, and age. The main menu offers these options. Based on the user's selection, the program performs the corresponding operation on the records and provides feedback. The code and sample output are included.

Uploaded by

aleemabdullah96
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Lab 13 Roll no 023

Open ended lab


Making students records using arrays and functions

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

Clearing all records:

You might also like