Question

Design and implement a menu-driven program in C that allows the user to perform operations on a set of student records for BCA students such as adding a new record, displaying all records, searching a student by roll number, modifying details, and deleting a record. The program should be implemented using main () and user-defined functions for each operation.

Description:

Menu should be as follows:

----Student Record Management--

1. Add New Student

. Display All Students

3. Search Student by Roll Number

4. Modify Student Record

5. Delete Student Record

6. Exit

Enter your choice:

tion Name Description
void addStudent() Adds a new student record
void displayStudents() Displays all student records
void searchStudent() Searches for a student by roll number
void modifyStudent() Modifies details of an existing student
void deleteStudent() Deletes a student record

 

 

 

 

 

12 Sep 2025
Answer :
Word Count : 917
To design and implement a menu-driven program in C for managing BCA student records, we need to structure the program into a `main()` function that controls the menu flow and several user-defined functions for each operation, namely: `addStudent()`, `displayStudents()`, `searchStudent()`, `modifyStudent()`, and `deleteStudent()`. The primary objective is to allow the user to interactively perform CRUD (Create, Read, Update, Delete) operations on student records. Each record will contain fields such as Roll Number, Name, Course, and Marks, though additional fields can be added based on requirement. We start by defining a structure `Student` to hold student details. Using structures enables the program to manage multiple attributes of a student in a single variable. An array of structures will store the student records, and an integer variable `count` will keep track of the number of students currently in the database. ```c #include #include #define MAX 100 struct Student { int rollNo; char name[50]; char course[50]; float marks; }; struct Student students[MAX]; int count = 0; ``` The first function, `addStudent()`, will prompt the user to input student details, store them in the `students` array, and increment the `count`. The function also validates whether the array has space for additional records. ```c void addStudent() { if (count >= MAX) { printf("Cannot add more students. Database full.\n"); return; } printf("Enter Roll Number: "); scanf("%d", &students[count].rollNo); printf("Enter Name: "); scanf(" %[^\n]", students[count].name); printf("Enter Course: "); scanf(" %[^\n]", students[count].course); printf("Enter Marks: "); scanf("%f", &students[count].marks); count++; printf("Student record added successfully.\n"); } ``` The `displayStudents()` function iterates through the array of students and
_________ ______ _________ ________ __________ _________.
______ __________ __________ _____ _______ __________ ______ ______ ______ ________ _____ _________.
_______ ______ _______ ________ ____ ________ __________ _____.
_______ _______ _______ ___ _____ _________ __________ ____ _______ _____.
_______ _________ _________ _____ ________.
_________ _____ __________ ___ _______.
_____ ________ ____ _________ ______ _______ _________ ________ _______ ___ _____ ______.
______ _____ _____ ________ ____ _____ ___.
_______ __________ ______ ____ ____ ___.
______ _________ _________ __________ ______ _______ _____ ____.
________ ______ _______ _______ _____ ____ ____.
___ __________ ___ __________ _____ ________ __________ ____ ________.
__________ ____ __________ ____ __________ _____ ________ _________ ________ _________ ______ ___.
_________ ______ ______ ____ ____ ________.
_______ __________ ______ ___ ________ ______ _______ ______ ____ _________ _______ __________.
____ _________ ________ ____ _______ ______ ___ _________ ____ ________ _____.
_____ _____ ____ ____ _____ _________ _____ _____ _________ _____ _________ ______.
________ _______ _____ ___ ______ _________ ______.
__________ _________ ___ ____ ____ ______ ________.
_________ ______ _________ __________ ______ _____ ______ _____ ___ _____.
________ _______ ______ _____ ____ ___ __________ _______ _________ ________ ___.
______ ______ _____ ___ _________ __________.
_____ ______ __________ ____ ____ __________ ___ __________.
_____ ________ ________ ____ _________ ______ _________ ________ _______ ____ _______ ____.
_________ ___ _____ _________ ____ ______ ____ _________.
___ _______ _____ ____ ____ _______ ______ __________ ______ ____.
___ ____ _________ ______ _____ _______.
_______ ______ ______ _____ ________ _________ __________ __________ _________ _____.
___ ______ ________ ______ ____.
________ ______ ____ _____ _______ ___ ________ ______ ____.
__________ _______ ________ ____ ___ ___ ________.
________ _________ _____ __________ _____ _____ __________.
________ ____ __________ _________ __________ ________.
_____ ___ _____ ______ _______ __________ _________ ___ ______ ______ _____ ____.
________ ______ _______ _______ _______ ______ ___ ________ __________ ______.
_____ ______ ____ ____ ___ _____.
__________ _______ _________ _________ ____ _______.
_____ ________ _________ ___ ________ _______ _______ ______ __________ __________ ______.
______ _____ _________ _____ _____ __________ __________.
_________ ____ _____ ______ _____ ____ _____.
________ ____ _________ _______ _____ _________ ______ ________.
____ _____ _______ ___ ________ ______ _________ __________ ________ ____ _____ ___.
_______ ____ ___ __________ _________ _____ _________ __________ __________ _____ _________ _____.
_________ ____ ___ ___ ____ _____ _________ __________ ________.
____ _________ ___ _____ ______ ______ _____ ____ _________.
__________ _______ _______ _______ __________ _________.
____ ____ ______ __________ _______ __________ ______ _______ ___ ______ _______.
________ ______ ____ ____ ________ _______ _______ ___ ___.
______ __________ ___ ________ _______ ________ ______ _______ ____ ____.
____ _____ ___ _______ ____ _______ _____ ________ __________ ______.
__________ _____ ________ ____ _______ ________ ______ __________ ____ __________.
___ ______ __________ ________ _____.
__________ _________ ________ _______ _______ ____ _________ _______ _____ ________ ________.
________ ____ _____ _________ _____ ___ __________ ______ ______.
____ ____ _______ ______ _________.
__________ ________ __________ ________ ________ ______ ________ _______ ____.
________ ______ ________ _____ __________ ________ _____ _________ __________ ___.
________ ________ __________ _____ _________ _________ ___ ______ _____ ______ ______.
_________ ________ ______ __________ _____ _______ ______ __________ _____.
___ _____ _______ ______ __________ _______ _______ _____ ___ _____ _________.
____ _______ ______ ______ _________.
__________ ________ ______ ____ _____ _______ _____ ________ _______.
__________ __________ __________ _______ _______ ___ ______ ______ __________ ___ _________.
___ _______ _____ ___ ________ _____ ___ ________ _______ _____ ________ _____.
______ _____ ______ ____ __________ _____ ___ _____ ___ __________.
_________ ___ _________ ____ _________ ______ __________ _____.
_________ _______ ______ ____ ________ ____ _________ _________ ________ ______.
_________ _______ ____ __________ _______ _________ ____ ________ ________ _________ ____.
_______ _____ _____ ______ ____ ____ ______.
__________ ____ __________ ______ _________ ______ _______ _____ ____ ________ ______ _____.
______ _________ __________ _______ ____ ____ ____ _______ ____ ___ _________ ________.
_______ ____ __________ _______ _____ ___.
________ __________ ____ ___ ________ _________.
________ ______ _____ __________ _______ _______ _____ _________ _______ ____.
___ __________ _________ _______ ________ _______ __________ ___ __________.
IGNOU ACADEMY
Your IGNOU journey, made easier.
  • Solved Assignments
  • Study Notes
  • Guess Papers
  • Question Papers
Skip in 10
Top
📞
Call Support Instant phone assistance IGNOU BCSL 21 2025 2026 - Design and implement a menu-driven program in C that allows the user t | IGNOU Academy
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→