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
→