Using Structures write an interactive program in C language to create an application
program for a small school to maintain the Student_’s database. This application should
be having menu options like (10 Marks)
• Creating a New Record
• Reading/Listing of Records
• Modify the record
•Delete the record
Each Student_ record should have Student_Name, Student_Roll_No., Student_Class, Student_Fees, Date of Admission, etc.). The application should be designed user-friendly.
To develop an interactive application in C for maintaining a small school’s student database, we can use structures to manage student records. This C program will implement a menu-driven approach to perform operations like creating new records, displaying records, modifying records, and deleting records.
### Step 1: Define the Structure
We will define a structure `Student` to hold all the required student details:
```c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define MAX_STUDENTS 100
// Defining structure for student
struct Student {
char name[50];
int rollNo;
char className[20];
float fees;
char admissionDate[20];
};
// Function prototypes
void createRecord(struct Student students[], int *count);
void listRecords(struct Student students[], int count);
void modifyRecord(struct Student students[], int count);
void deleteRecord(struct Student students[], int *count);
int findStudentIndex(struct Student students[], int count, int rollNo);
```
### Step 2: Implement the Menu and Operations
The program will allow the user to choose an option from the menu. Based on the choice, it will call the respective function.
```c
int main() {
struct Student students[MAX_STUDENTS];
int count = 0; // To track the number of students in the database
int choice;
while (1) {
// Displaying the menu
printf("\nSchool Student Database System\n");
printf("1. Create a New Record\n");
________ ______ _____ __________ ________ _______ ________ _______ ______.
______ _______ ____ ____ ___ ___ ________ _______ ____.
_____ _______ __________ ______ ___ _________ _________ __________ __________ __________.
___ _____ ___ ___ ___ _______ _________ __________ ________ _______.
________ ______ _________ _________ _________ ___ _________ __________ _____ _____ ___ _______.
______ ____ ________ ____ _____ __________ __________.
_____ ____ _______ _______ ___.
_________ _____ ____ _________ _______ _____ ______ ________.
_______ _________ ________ _____ ___ _________ _____.
_______ _______ _________ _______ _________ ________ ___ __________.
__________ _______ ____ _______ ______ ____ _________ ____ _________ _____.
____ _______ ___ _____ ______ _______ __________ _____ _________.
_______ __________ _________ _________ ___ _________ __________ ________ __________ ______ _________.
_______ ______ ______ ____ ____ ____ _______ _________ _____ __________ ______.
__________ ______ __________ ____ __________ ______.
_______ _________ ______ ______ _________.
__________ _____ _______ __________ ______ _________ _____ __________ ______.
_______ _________ ______ ___ ________ ________ _____ ________ ______ _______ ____.
______ ______ _____ ________ _____.
_________ _______ __________ ____ _________ _______ _____ _____ ________.
____ __________ __________ __________ ____ _______ _____ _____ ___ _________ ___ _________.
___ ____ _________ _________ _____ _______ _____.
____ _________ _______ ______ ____ _______.
__________ ________ ___ _______ ________.
___ __________ ____ __________ _________ ___ _____ ____ ___ ____ ______ _______.
________ ______ ___ ______ _____ ___ _______ ___ ______ ________ ___.
_______ ________ _________ _________ ______.
_____ ____ ________ _______ ____ _______.
_________ ___ _____ _________ ________ ________ _________ _______ _____.
______ _________ _______ ____ _____ _____.
____ ________ _____ ________ ____ ______ ____ ______ _____.
__________ ___ ________ ________ __________ _____ _______ ____ __________.
______ ________ ______ ___ _________ _____ ______ ______ ______ ________ ____.
________ __________ ________ _________ _________ _______ ____ ____.
______ _______ ________ __________ ___.
__________ ________ _____ ______ ______ _____ _____ ____ _____ ________.
_____ ____ __________ _________ _________.
_____ __________ _______ ____ ____ _________.
_____ ___ _________ ______ _____ _______.
__________ ________ ______ _______ _____ _______ ___ _____.
___ ___ __________ _____ ________.
___ ________ _____ ______ ________ __________ _______ ___ _________ ____ ___ ____.
__________ ____ ________ _______ ___ ___ _________ __________ ____.
___ ____ ______ ___ _______.
__________ _______ ______ ______ ______ _______ ________ ____ __________.
__________ _____ _____ _________ ______ ____.
____ _________ _____ __________ __________ _________ ______ _____ ___ _______ _____.
_____ __________ ___ ________ __________ ________ _______ __________.
______ ____ ________ ________ ___ ______ ______ ___ _____ __________.
________ ________ ________ ___ _____.
______ ______ _______ __________ ________ ________ ___ _____ ______ _________ _________.
________ ___ ___ ________ ______ _____ ____ ____ ______ _____ ________.
______ __________ _______ ____ _______ ____ ___ _____ ________.
_________ ___ ________ ___ ___ ______ _____.
________ _________ __________ _______ ______ _________ _______ _____ _____ _________ ____.
_______ _________ ____ ___ _______ ________ ____ _____ ___ __________ _____.
________ ___ ___ _______ __________ _______ __________ _______ _____.
_______ ___ __________ _____ _______ ______.
________ __________ __________ _________ ____ ____.
________ _____ __________ ___ ________ __________ _____ ______.
_____ ________ __________ _________ _____ __________ ____ _____.
___ ________ _______ __________ __________ _________ __________ _____ _____ _____.
________ __________ ________ ____ _____ _____ ___ _____ _______ __________ ___.
___ ___ ______ ______ ____ _______ __________ _________ _______ _________ _______ _______.
__________ _______ _________ _______ _____.
_______ ________ ___ ___ ______ _________ ____ ______ ___ ___ ____ _______.
_____ ____ ____ _________ _______ ___ __________.
_______ ___ ___ __________ _________ ____ ____ _____ _______ _____ _____.
_______ ______ _____ ____ _____ _________ _______ ___ ________.
______ ______ ______ ____ _______ __________ ___ ______ ________.
_______ ______ ____ ___ _______ __________.
____ _____ _____ _____ _______ ______ _______ ___ ____ _________.
______ _______ ________ ______ _______ ______ _________ ____.
_____ ____ __________ ____ ________ _______ ___ _________.
_________ _______ _____ __________ __________ ______ ________ _________ __________ ________ _____.
__________ __________ _____ ________ ____ ____ ____ _____ ___.
__________ _____ __________ ___ ___.
____ ___ ___ ____ _________ __________ ________ _____ _____ _______ _________.
_____ ___ _______ _______ ___ _______ ______ _______ _______.
_________ ________ __________ _________ ______ _________ ________.
_____ __________ ____ _____ ________ _____ __________.
________ _____ __________ ___ __________ _____ ________.
______ _______ ______ _________ ______ __________ _________ ______.
_____ ___ __________ ________ _________.
_______ ______ _______ ______ ______ _________.
_______ ____ ______ _____ ____ _____ _________ ______ ________.
________ _________ ________ _____ _________ ________ ________ ____ _____ _____.
_______ _________ ______ ___ _______ ________ _________ _________ _______.
__________ _____ _________ ____ _________ ___ _________ ________ ______ ______ _______.
____ _________ ____ _______ __________ _________ _________ ______ _______.
_________ __________ _______ ___ _______ _________ _________ _____ ___ ______.
________ ______ _________ ___ ___ ________ ______ ______ _____ ___.
_____ ______ ________ ___ ___ ____ _______.
____ ___ ___ _______ ___ ___ ___ __________ _________ ___ ____ ______.
_____ ___ ______ _________ _____ ___ _____.
___ _________ _________ ____ ________ _____ __________ ______ __________ _______.
________ ______ ____ ______ _________ ____ ______ ________ _________ ________ ______ __________.
___ ________ __________ _________ ______ _________ ______.
_______ ________ ______ _____ _____.
________ _________ ____ ____ ___ _____ _________ _____ ___ _________.
_____ _________ _________ _______ _____ ____ _____ _____ ________ ______.
__________ _____ ________ ______ ____ ________ _________ ________ ______ ______ ____.
_____ __________ ______ _____ ___ ___ ___ _________ _____ ____.
____ _____ __________ _________ _________ ______ ______ ________ ____.
______ ____ ___ ___ ___.
________ _____ ______ ________ ________ ____ ____ ________ _____.
______ _________ ____ ___ ____ ___ ________ ________ ____ ______.
______ ________ _____ _______ ____ ___ ____ ___ ___ ______ ______.
________ __________ _____ _____ _______ __________ ________ _____ _______ ___.
__________ ___ _____ _________ __________ ________ ______ ________ ____ ______ ________ _________.
_________ _______ ________ ______ __________.
______ ____ ___ __________ ____.
_____ ___ ______ ________ ____ _____ __________ ______ _______ ______.
_____ ___ ___ _____ ______ ________ ______ _____ ____ _______ ______.
_________ __________ _______ __________ ______ __________ _________ ______ ______ __________ ____.
__________ ____ ______ __________ _______.
______ __________ ___ ______ _____ ________ ____ ____.
_____ ______ _____ ______ _________ __________ _________ ____ _______ ______ ____.
__________ _______ _____ __________.
Get Full Answer on WhatsApp