Question

Using Structures write an interactive program in C language to create an application program for a small office to maintain the employee’s database. This application should be having menu options like (20 Marks)
• Creating a New Record
• Reading/Listing of Records
• Modify the record
• Delete the record

Each employee record should have Employee Name, Employee ID, Department Name, Salary, Position, Date of Joining, etc. The application should be designed user-friendly.

15 Apr 2024
Answer :
Word Count : 1356

Here's a detailed explanation and implementation for the requested C program that uses structures to manage an employee database with functionalities for creating, reading, modifying, and deleting records.  

---

### Code Explanation

The program uses a structure `Employee` to store the details of each employee. Key elements include:
- Fields in the structure: Employee Name, Employee ID, Department, Salary, Position, and Date of Joining.
- Dynamic Management: An array is used to hold multiple employees. A counter (`empCount`) keeps track of the number of employees.
- Functions for operations: Each menu option is implemented as a separate function for modularity.

### Implementation

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

#define MAX_EMPLOYEES 100

// Structure definition for Employee
struct Employee {
    int id;
    char name[50];
    char department[30];
    float salary;
    char position[30];
    char dateOfJoining[15];
};

// Global variables
struct Employee employees[MAX_EMPLOYEES];
int empCount = 0;

// Function prototypes
void createNewRecord();
void listRecords();
void modifyRecord();
void deleteRecord();
void displayMenu();

int main() {
    int choice;
    while (1) {
        displayMenu();
        printf("\nEnter your choice: ");
        scanf("%d", &choice);

      ____ _____ ________ ____ ________ _____.
________ _______ ________ _____ ________ _____ _______ _________ _____ _____ _________ __________.
_____ _________ ________ __________ ____ __________ ___ _________ _______ ___ __________.
_______ ________ _____ _____ ______.
_____ ________ _____ ___ ________ ______ _________ _______ _______ ___.
_______ ______ __________ __________ _______ ____ _________ ____ ___ _____.
_____ ______ _____ __________ ________ ___ ______ __________ _________ ______ ________ _____.
_________ ____ _____ ___ _____.
_______ ___ ____ ___ __________ ____.
_________ _____ _____ ____ _____ ______ ___ ______.
______ _______ _________ ____ ___ ______ ________ ________ ____ ___ _______ ____.
_______ _________ ______ _____ ____ ________ ___ ____ ____ ___ ________.
____ ___ ___ ______ ________ ___ _______ ___ _________ ______.
__________ ____ _____ ___ __________ _________ __________ __________ ___ _______ ______.
____ ___ ___ _____ ____ ___ ____ _________ ____ ________ ______ ___.
____ ____ _____ __________ ________ ___ ______ ____ __________ ___.
_________ __________ ________ ___ ____ ______ ___ ______ ________ ____ _______.
_______ ___ ________ ____ _____ ___ ____.
______ _______ __________ _______ ____.
_______ ________ ____ __________ ______ ___.
________ ___ ____ ________ ___.
_____ __________ ________ __________ ____ ____ __________ ___ ___ ____ ____ __________.
_________ ____ ___ ______ ________ _______ ____ ___ _______ ________ ____ _________.
__________ _____ __________ _________ ______ ______ ____ _______ ________ ________ ____ _________.
________ ___ __________ _____ __________ __________ ________ ________ ___ _______.
______ __________ ____ ____ _________ ____ _____ _______ _______ _______.
_________ _________ ______ _________ _________ ___ _____ ___.
____ _______ ___ ________ ______.
______ ______ _______ _______ ________ _________ ___ _____ ______ _____ _________ _______.
_____ _________ _________ ______ ________ ______ ___ _______ _______ _________ __________.
_______ ______ ___ __________ ______ _________ ____ __________ ______.
_________ ________ ___ ________ ______ ______ ____ __________ ____ __________ __________.
__________ _________ _______ ______ ______ ______.
_____ ________ __________ _______ ________ ______ _______ __________ ___ _____.
_________ _____ _______ ______ _____ _________ ______ _______ ____ ____ ___.
___ ____ ______ ____ ___ _________ ____ ________ _______.
_____ _________ _________ ______ _________ ________ ________ __________ ___ ________.
__________ ___ ______ _____ _________ ___.
_________ ____ ______ __________ _________ ___ _____ _______ _____.
_____ ______ _________ _________ __________ ______.
_______ ________ _________ ____ ________ __________ ________ _____ __________ ______.
_________ __________ _____ ______ ____ _________ _______ ___ ___ ____ _______.
____ __________ ______ ______ ______ ________ _____ _______ ____.
_____ _____ ________ __________ ___ _________ __________ ______ ____ ____ ___ ______.
__________ ______ _________ ____ _____ ______ __________ ______ _____ ______.
________ _______ _______ _______ _______ ____ ____ _______ _____ ____ ________ _______.
_________ _______ _____ ________ ____ ______ _____.
_______ __________ __________ ________ _______ _____ _______ ________ _____ __________ ______.
____ __________ _____ _____ ____ ________ ______ ___ ______ ______ __________.
_____ __________ _________ _____ _____ _________ __________ ________ ____ ________ _____.
__________ _________ __________ ____ _______ __________.
_______ _________ ___ _________ _______ ________ ________ __________ _____ ______ __________.
____ _____ ___ _____ _____ ______.
______ _______ ________ ____ ________ __________ _______ _________ ________ _____ _______.
__________ _____ ___ _______ __________ ________ _______ _________ _______.
_______ _______ __________ _________ _____ _______ ___.
__________ ______ ________ ______ _______ _____ __________ ___ _________ _______ ______ ______.
___ ____ ____ _______ __________ _____ ________ ________.
_________ ___ ____ ________ __________.
___ __________ ________ ____ ____ __________ ___ ______.
___ _______ ________ ___ ____ __________ __________.
_________ ____ _________ _______ ______ _____ ___ ____ ___ ______ ___.
_____ ___ _________ _________ ______ ____ __________ _____ ______ __________ _____.
__________ ________ ____ __________ ______ _______ _____ ___ ____ _________.
________ ____ ________ __________ _________ __________ ______ ________ __________ ______.
_______ ________ ________ __________ __________ ___ _________ ________.
_________ ___ ________ _____ _________ _________.
____ __________ ____ ________ ______ _____ _________ ________.
_____ ________ _____ ________ _________ _______ _______ _________ _______ ______ ___.
__________ __________ ___ _____ __________ ____ _________ ________ __________.
______ ________ _________ ___ _____ ______ ___ ___ _____ ____ __________.
____ _____ ______ ______ _________ _________ _________ ________ _________.
______ ______ __________ ___ _________ _______ ______ ____ ____ _________.
____ _______ ____ ____ _________ __________ ______ _________ _____ _____ ______.
_____ _____ __________ __________ __________ ______ _____ ________ __________ _________ _____ ________.
_________ _______ __________ ___ _________ ________ ____ ______ ___ _______.
_____ _____ __________ ________ _____ _____ _________.
______ ________ _______ _______ _____ _____.
_____ ________ ______ ________ ______ ________ _____ _______ ___ ____ ___.
_______ ______ _____ ________ _______ ____ _________.
________ _________ ____ ________ _________ ____ ____ _______ _________ ____.
___ _______ ___ ____ _____ ________ _________ ______ ________ __________.
_________ _____ _______ __________ __________ ____ _________.
____ ____ _______ ____ ________ ______ ______.
_______ _____ _________ ______ _______ _________ ______ _________ ___ _______.
____ ____ _________ _______ _____ _______ __________ ___.
__________ _______ ___ ______ _____.
____ ________ ________ _________ ___ ___.
__________ _______ ___ ______ _____ ______.
_________ ________ _________ _____ ___.
______ _________ _________ ___ ___ ___ ________ _________.
_____ ________ ____ __________ ______ _____.
_______ ______ ________ __________ __________ ________ _____ _____.
________ ______ ____ __________ _______ ___ ___.
__________ _________ ________ ______ ___ ______ _________ ___ __________ ___.
______ ________ __________ __________ _______ ________.
______ _________ _____ ___ _______ ________.
_______ __________ __________ _____ ______ ______ _____ ____ _____ ___ ________ _________.
________ ________ _________ _________ __________ _____ _________ _________.
________ _______ ___ ____ _________ ______.
______ ____ ______ ____ _______.
______ _________ __________ ________ _______ __________ ______ ______ ____.
___ ___ _________ _________ _______ ___ _____ _______ _______.
_____ ____ ____ ________ __________.
________ ___ _________ _____ ___.
_____ _________ _______ ___ ______ _____ ________ _________ ___ _____ ___ ____.
_____ ___ _________ ________ ________ _____ _________ ________ ___ _______ ___.
_______ ____ ___ __________ ______ _____ _________ _________ ___ _________.
_____ _________ ___ ___ _______ ________ _______ __________ ____ ________.
________ _______ _________ ______ ______ _______ _____ ______.
_______ ______ ________ _________ ______ _______ _____ _____ ___ _____.
________ ____ ______ ___ ______ _______.
____ ____ _______ _____ _________ ____ __________ ______ ______ _____ _______ _________.
_______ ______ _____ _________ ________ _______ _________ ______ ________ __________.
______ _________ ___ ________ ____ ______.
________ _________ __________ _________ _____ ______ ______ _____ _________ ______ ___ ____.
_________ _____ ____ _____ ____ __________ _______ ________.
_________ _________ __________ _________ _____ ____.
_____ ____ _________ ____ ___ ___ __________ _______ ___ _______.
_________ _____ _______ _______ ___ ___ ______ ________ _________ ____ _______.
___ _________ _____ _______ _______ _______ _________ ___ _______ __________ ________.
_________ _____ ______ _________ ________ ________.
____ _________ _________ ____ ________ ________ _____ __________ __________.
_____ ____ _________ __________ _______ ___ _______ _________.
_____ _____ __________ _______ ____ __________ ________ _______.
____ _______ ____ ______ _____ _________ ___.
________ ________ _______ _________ __________ _________.
_________ ________ _______ _________ _____ ____ _____ _________ __________ ____ ____.
______ _________.
Get Full Answer on WhatsApp

IGNOU NEWS
Assignment Submission Last Date Extended Till 30 June 2026 Click Here★★★IGNOU June 2026 TEE Date Sheet Released Click Here★★★
Top
📞
Call Support Instant phone assistance Using Structures write an interactive program in C language to create
🟢
WhatsApp Chat Fast live messaging
Email Us Business enquiries & support