Question

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.

30 Nov 2023
Answer :
Word Count : 1264

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");
        printf("2. List all Records\n");
        printf("3. Modify a Record\n");
        printf("4. Delete a Record\n");
        printf("5. Exit\n");
        printf("Enter your choice: ");
        scanf("%d", &choice);

        switch(choice) {
            case 1:
                createRecord(students, &count);
                break;
            case 2:
                listRecords(students, count);
                break;
            case 3:
                modifyRecord(students, count);
                break;
            case 4:
                deleteRecord(students, &count);
                break;
            case 5:
                printf("Exiting...\n");
                exit(0);
            default:
                printf("Invalid choice. Please try again.\n");
 

__________ ____ ____ ____ _________ _________ __________ ____ ______ _________ ____.
_____ _________ __________ ___ _____.
________ _________ ________ ___ __________ _________ __________ ______ _________ _______ ____.
__________ __________ ___ ____ _________.
___ ____ _________ _________ ________ _____ _________ __________.
____ _________ _______ ______ ___.
__________ ______ __________ ________ ___ _________ _________ ________.
__________ ______ ___ ______ _____ _______ ________ ____ _______ _____ _______.
_____ ______ _____ _____ _________ ___ ______ _______ _____.
________ _____ ____ _________ _______.
_________ _______ ________ ____ __________ ______ _________ _____ __________ ___.
_____ ______ _________ ____ _____ _____.
___ _________ _______ _______ _____ ______ ___ __________ ______ _____ __________.
______ ________ ______ _________ _____.
__________ _______ _____ ______ ____ __________ _______ ______.
_________ __________ ____ _______ ______.
_______ _____ ___ __________ _____ _____ ________ _________ _______ _____ ____.
_______ ___ ________ _______ __________ _______ ___ ______ ____ ______ _______ ________.
_____ ___ ____ __________ ___ __________ __________ __________ ______.
_____ ___ ______ ____ _____ _________ ______ ___ ________ ________.
_________ ____ ____ _____ _________ _______ ______ ________.
__________ ___ ______ __________ ___.
__________ ________ ______ ________ ____ _________ ___ __________ ______.
__________ __________ ___ ________ ___ _______ ____ _____.
_______ ___ _____ ___ _________ ________ ________ ____ _________ ______ ____.
______ _________ ____ ____ ___ ___.
__________ ________ _________ _________ ___ ______ ________ ________ ________.
____ _____ _________ ___ _________ __________ ________ ______ ______ ____.
_____ __________ _______ ____ _____ ______ _________ _________ ______ __________.
________ __________ _____ _____ _________.
______ _______ ____ ______ _________ ______ _______ __________ ________ _________ __________ __________.
________ _______ _____ ____ __________ _____ _______.
___ _____ ________ ____ _____ ______ ______ ________ _________ _____ __________.
_________ _________ ______ ______ _______.
_______ ______ ________ _______ ____ ________ _______ _________ _______.
___ ____ _________ ______ _____ __________ ________ ________ _____.
_____ __________ _____ _______ __________ __________ ________ __________.
________ ____ ____ ____ _______ ________ ____ _____ _________.
______ ________ _____ __________ _______ _____ ____ _______ ______ __________ _____.
____ ____ _____ __________ _____ ___ ________ __________ _____ _______ _______.
________ ____ _______ _____ ________.
__________ ____ ______ _______ ________ __________ _________ ____ ________ ____.
______ ____ _______ _______ ________ ________ ________.
_________ ________ ______ _____ _________ ___ __________.
__________ _________ __________ ________ ________ ______ __________ _____ _____ __________ ______.
________ ____ ______ ____ ________ ________ __________ ___ _____ _________ __________.
___ ____ _____ ________ __________ _______ ______ _______ ________ _______.
___ ________ _________ ________ _________ __________.
_____ ____ _______ ________ _____ ___ ___ ______.
__________ _____ ________ __________ _________ _________ __________ ___.
_______ _____ __________ _____ ______.
_______ ________ ________ __________ ________ ____ _________.
_________ ________ _______ __________ ____ _____ ____ _____.
_____ ________ __________ ____ _____ ________ _______ _______ ______ _________.
_________ ___ ________ __________ _____ _______ _____.
______ _________ _____ ________ _______ _______ ___ ___ _________ ____ ___.
__________ ___ ___ ______ ________ ___.
______ _________ ________ ______ _____ __________ __________ ______ ________ ______ ________.
________ _________ _________ __________ _______ ___ _____ ___ _________ _________ ________ ______.
_________ ________ __________ __________ _________ _________ _______ _________ ___ _______ _________.
_____ ____ _________ _____ __________ ______ ___ ______ ______ __________.
__________ ________ _______ _________ ______ ________ _____ _______ __________ ___ ____.
____ ___ __________ ________ ______ ___ ______ ______ ________ _________ __________.
_________ __________ __________ ___ ___ _________ __________ _________ __________ ____ ___ _________.
______ _____ ______ ____ ______ _______ _______ _________.
_______ _________ ___ __________ ________ __________ ___ _____ __________ ________.
_________ _____ _____ ____ ___.
____ ____ _____ ___ _________ ___ _________.
_________ ____ __________ _______ ___.
______ _________ __________ ____ _______ _____ ___ ____ ____.
____ ____ _________ ________ ______ _________.
_________ _________ ________ _______ ________ ________ ____ _____ ___ ______.
______ _________ ______ ________ _______ ____ ______ _________ _________.
__________ ______ ______ __________ _______ __________ ___.
____ _______ ________ _____ ____ _______ _________ ____ ____ ________.
___ ______ ___ ______ _____ _______ _____.
________ ___ ________ _____ ___ _____ _______ _____ _______.
________ __________ ________ __________ __________ ________ ____.
____ ____ _____ ____ ______ _____ __________ _________ __________ ___.
________ __________ ____ __________ ______ ___ ___ ________ ____ ______.
_____ _______ __________ ___ _________ ____.
____ _________ ______ ______ _____ ________ __________ _______.
_________ ___ ___ _____ ______ ___ ___.
__________ __________ ___ __________ _________ ____ ________ __________.
______ _____ _______ _________ ___ ___ _________ ___.
____ ______ _____ ________ ________ ____ ___ ________ ____ ______ _______ ________.
_______ _______ __________ ________ _________ __________ ___ ___ ____ __________ ________.
__________ __________ _____ _____ _________ ____ ___.
________ ____ ______ _________ _______ _________ ____ _______ ___ _______.
___ _________ _______ ____ ______ __________ __________ __________.
_________ ____ ______ _____ ________ __________ _____ ______ _________.
____ ________ _________ _______ __________ ___ ________ _______.
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 MCSL 205 2023 - Using Structures write an interactive program in C language to create | IGNOU Academy
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→