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 
• 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

27 Apr 2023
Answer :
Word Count : 1076

Here is a C program that uses structures to create an interactive student database management application for a small school:

```c
#include <stdio.h>
#include <string.h>

struct Student {
    char name[100];
    int roll_no;
    char student_class[10];
    float fees;
    char admission_date[20];
};

void createRecord(struct Student* student) {
    printf("Enter Student Name: ");
    fgets(student->name, sizeof(student->name), stdin);
    student->name[strcspn(student->name, "\n")] = 0; // Remove newline character

    printf("Enter Student Roll Number: ");
    scanf("%d", &student->roll_no);
    getchar(); // Consume newline character left by scanf

    printf("Enter Student Class: ");
    fgets(student->student_class, sizeof(student->student_class), stdin);
    student->student_class[strcspn(student->student_class, "\n")] = 0;

    printf("Enter Student Fees: ");
    scanf("%f", &student->fees);
    getchar(); // Consume newline character

    printf("Enter Date of Admission (DD/MM/YYYY): ");
    fgets(student->admission_date, sizeof(student->admission_date), stdin);
    student->admission_date[strcspn(student->admission_date, "\n")] = 0;
}

void listRecords(struct Student* students, int count) {
    if(count == 0) {
        printf("No records available.\n");
        return;
    }

    printf("List of Students:\n");
    for(int i = 0; i < count; i++) {
        printf("\nStudent %d:\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 2022 2023 - Using Structures write an interactive program in C language to create | IGNOU Academy
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→