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
• 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.
Note: You must execute the program and submit the program logic, sample input and output along
with the necessary documentation for this question. Assumptions can be made wherever necessary
To design an interactive program in C that maintains an employee database for a small office, we will use structures to store employee details. The program will have a menu-driven interface with options to create, read, modify, and delete employee records. The data for each employee will include attributes like Employee Name, Employee ID, Department Name, Salary, Position, and Date of Joining.
### Key Features:
- Creating a New Record: This option will allow the user to input details of a new employee and save the record.
- Reading/Listing of Records: This option will display a list of all employee records stored in the system.
- Modify the Record: This option will allow the user to modify details of an existing employee.
- Delete the Record: This option will allow the user to remove a particular employee’s record from the system.
### Program Logic:
We will use a structure to represent each employee, and then implement the following functionalities:
- Add a new employee to the database (add to a list).
- Display all employees.
- Modify the details of an employee by Employee ID.
- Delete an employee record based on Employee ID.
Below is the C code that implements these features:
```c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_EMPLOYEES 100
// Structure to store employee details
struct Employee {
char name[50];
int emp_id;
char department[30];
float salary;
char position[30];
char date_of_joining[15];
};
// Function declarations
void create_record(struct Employee* employees, int* emp_count);
void list_records(struct Employee* ________ ____ ______ _______ _____.
__________ _______ ____ _________ __________ _______ _______ ______ ________ ____ ______ ___.
________ ___ _______ ________ ________ ___ _____ __________ ___ ______ ________.
____ __________ _______ ______ ____ ___ ___ _____ ______ _________.
_______ ______ ____ ________ ________ _____ ________ _______ _________ _______.
______ _______ _____ ___ _________ ________ __________ ____ __________.
_______ ___ _______ _____ __________ ___ __________ __________ ______.
____ __________ _______ __________ _____.
____ __________ __________ _________ ______ ____ ____ _____.
_________ ____ _________ ___ _______ ____ _______ ______ __________ __________ __________.
___ _______ _________ __________ ________ ____ ______ _____ _______.
____ ________ ___ __________ ____ ______ __________ _______ _________ _________ _______.
_________ ___ _________ _______ ___ ________ ______ _____ ______ _________ ____ ________.
______ _______ _____ _________ ___ __________ __________ _____.
___ ____ __________ ________ ____ _______ ___ ____ __________.
_______ ______ _________ ___ ______.
____ _______ _________ ____ ________ _____ _________ ___ ______ ________ ____ ______.
___ _____ _____ ____ __________ ________ _________.
________ ______ _____ __________ ________ ________ ________ ________ ____ ________ ____ ___.
__________ ____ _____ _________ ____ ______ ____ _______ ______.
____ _____ _____ _______ ___ _________ ________ _____.
___ _____ _______ ________ ______ __________ ___.
_____ _________ _____ ____ ___ _______ _____.
________ ______ _________ ___ ______ _________ ______.
__________ _____ __________ ________ __________ ______ _____.
___ ___ _____ ________ ______.
________ ___ ____ _______ _________ __________ _________ ______ _______ ______ _________ ______.
___ _______ _____ ___ __________ _____ ____.
_________ ________ __________ __________ ________ ______ __________ __________ ________.
___ _________ ________ ___ _______ ___ _________ ______.
________ __________ ______ _________ ____ _________ __________ ________.
_________ _____ _______ ________ ____ _________ _____ _______ ___ _________.
__________ ________ ___ _______ __________ _____ _______ ______ ____.
_______ _________ ______ _______ _______ ______ __________ __________ ___ __________.
___ ________ ________ __________ ___ _______ __________ __________ ____ ________ ______.
____ ______ __________ __________ _____ ______ ___ ________.
___ ______ _______ _____ _______.
____ ________ _______ _________ ____ _________ _____ _________ ______ _________ ______.
_________ _____ ____ ____ ___ ___ _________ ___ _________ ___ ___ ________.
______ ___ ___ ___ ___ _______ _________ _______ __________ _____ ______.
_____ ________ ____ ___ ________ ___ ___ _____ _________ _______ _________.
__________ _____ ___ ________ ________.
_________ _______ ___ ________ _________ _________ ________ ______ __________ __________.
__________ ______ __________ ____ _________ _______.
_______ ____ ____ ______ ____ ____ ________ ______.
___ ______ _________ ___ _________ ______ _________ _______.
______ _______ ___ ________ _____ ______ ____ _______ ____ ______.
____ ______ ___ ___ ____.
________ __________ _____ __________ ______ ___ _____.
_________ ______ _______ _______ ___ _______ _______ ________ _________ ________ _____.
____ _____ _______ ____ ___ ___ _________ __________ _______ ___ ___.
__________ _______ ______ _________ ______ ____ _______ ___ ______ ____.
____ ________ ____ ______ ____ _______.
__________ ____ _________ ____ _____.
____ ____ ___ _____ __________ _________ ______ _______.
____ ___ ______ ___ __________ _________ ______ ______ ____ ____ ______ _______.
___ ______ ________ ____ _______ _____.
___ _________ _____ _____ ______ ______ _________ ________ _______.
_________ ______ ____ _________ _____ _______ ______ _____.
________ __________ ___ ___ ______ ________ _________ ____.
________ ________ ____ ____ ____ ________.
____ _________ ____ ____ ________ __________ ___ ______ ______.
____ ______ ___ _____ __________ ____ _____ ____.
____ _____ _______ ______ _______ ________.
__________ ______ ________ _______ _________ __________ __________.
_____ _____ __________ ________ __________ ____.
_______ ________ _________ __________ __________ _______ _________ _________.
_________ _______ __________ _____ ________ _____ ____ _________ __________.
___ ___ _____ ________ _______.
____ ______ _____ ____ ___ _________ ______ __________ ________.
______ ___ ____ _____ ____ ________ ______ _______ ____ __________ ______ ___.
_____ __________ _________ _________ _________ _________ ___.
_________ _________ _________ _______ ________ ________ _________ ___ __________.
________ ________ __________ __________ ____ ____ __________ ______ __________.
_________ __________ ______ _____ ________ ____ _________ _____ _________ _______ _____.
______ _____ _________ ______ ____ _______.
______ _________ ______ _________ ____ ________ __________.
_______ ___ _____ ________ _______ _______ _____.
_________ ______ _____ _____ ___ __________.
___ ______ _____ __________ _____ _____ __________ ___.
_________ __________ __________ ________ __________ ________ __________ ___ ________ ______ ________ __________.
_________ ______ ___ ____ __________ ________ _______ ___.
_______ ______ _________ ___ _________ _________ __________ ___ ____ __________ _________.
_______ _____ ______ ______ __________ _______ ______ ______ _________.
________ ______ _______ _______ _________ ___ ________ _________ _______.
____ ______ __________ _________ ____.
____ _________ ____ _______ ______ ____ ___ ____ ____ _________.
___ __________ ____ _________ ______ ___ _______ _____ ____.
_______ ____ __________ ______ ___ ____ _____ __________ ________ _____ ___.
__________ ________ ______ ____ _____ __________ ________.
_________ ______ ____ ___ _______.
_______ ___ _______ _________ ________ ____.
____ __________ __________ ______ ___ ________ ___ _____ ___.
_____ _____ ___ _____ ______ ________ ____.
____ ___ _________ _______ _________ ___ ______ __________ ____ ____ ________ __________.
_____ _________ __________ ________ _____ ______.
______ ____ _______ ___ ____ _______ _____ __________.
____ ____ ____ _____ ___ _________ ____ _________.
___ _______ __________ __________ ___ _____ _____ ________ ________ ____ __________.
__________ _____ ________ _____ _____.
___ ____ _______ _________ ________ _______ ____.
______ ___ ____ __________ _______ _________ _______ ____ ________ _______ __________.
______ ______ ______ ___ ________.
_______ _____ _________ _________ ______ ____ ______ ____ ____ __________ _____.
__________ ___ ______ ____ __________ _________ _________.
________ ______ _______ ________ ___ ___ _______ _____ _______ _________ __________ ___.
___ __________ ________ ________ _______.
_______ _____ _______ ________ ______ ____ _________ ________ _____.
_____ _____ ____ ______ ______ ______ _______ __________ __________ ____ _________ ______.
___ __________ ____ _____ ______ ____ ________.
_______ _______ _________ ______ ___ _________ _____ ________ _____.
__________ _______ ______ ___ ___ _____ __________ ___ ___ _______.
________ _____ _________ ____ ___ ____ ___ _________ _________ ____ ____ ___.
_____ ___ _________ _____ _______ _______.
_________ ______ ____ ____ _____ ______ _____ _____ ________.
________ __________ ____ _______ ________ _____ ____ _____.
_____ ___ _____ ___ ________ __________ _________ _________ ________.
_________ ___ ___ __________ ________ ____ _______ ________ _____ _________ ____.
_______ ___ __________ _________ __________ _____ _________ ________ ________ ___ _________.
___ _______ _____ _____ _________ __________ __________ ___ ____ _____ ______.
______ ________ _______ ________ ________ _________ _________ _________ _________ _______ _____.
______ __________ ________ ___ _________ ____ ____ _____ _________.
______ _____ __________ ______ ____.
___ _______ __________ _____ ___ ___ _________.
___ _______ _________ _________ ________ ________ __________ ________.
_____ ____ _______ ____ _________ _________ ____.
______ ____ ________ _______ _______ ________ ______ _____ ___ _________ ____ _____.
_______ _____ _____ ________ __________ ________ _____ _______.
_____ __________ _________ __________ ________ ______ ______ ____ _______.
______ __________ __________ ________ ___ ___ _____ __________ ______ ________.
__________ _____ ______ ____ ______ _________ ____ _______ ________ _____ ___ ____.
_______ _______ ___ ___ ______ ___.
_______ ________ ___ ____ ___ _______ __________ _________ ______ ___ _________ _________.
____ ____ _____ _________ _________ _________ ________ ___ _________.
________ __________ __________ _______ ____.
_______ _____ __________ ______ _______.
______ _________ ________ ______ _____ ______.
________ ________ _________ ________ ________ ________ __________ _____ ___ _____ _________ ________.
____ ________ __________ ______ __________ _______ _______ ________.
__________ __________ _______ _______ _________ ___ _______ ____ ____ __________.
__________ ________ ___ _________ _______ _______.
_______ ________ ______ ________ ________ __________.
_________ ________ ___ _______ ________ _____ _____ ____ _____ ____ ____.
______ _____ _______ __________ _____ ______ _______ ________ ________.
_____ ________ __________ ________ _______ __________ ______ _________.
________ _________ ______ _________ _________ _______ ____ ____ ____ __________ __________ _________.
__________ _____ ______ ____ ______ ___ __________ ________ ________ _________.
__________ ___ ______ __________ ____ ____ _________ ______ ______ ______ _______ __________.
_______ _____ ____ ________ _______ __________ ______ _________ ______ ___ ____ ___.
____ _______ ___ __________ __________ _____ _____ ____ ____.
___ ________ ___ ____ _________ _____ ___ __________ ____ _____ _______ ___.
_______ ___ __________ __________ ___ ________ __________ ___ ________ _________.
___ _______ __________ _________ _______.
_________ ____ _____ ____ _________.
______ _______ ___ ____ _____ _________ _______ __________ ________.
_____ ________ ________ ______ _________ _________ _______ _____ ____ _____ _______ ______.
_________ ______ ____ _____ _________ _________ __________ _______ ______.
__________ _________ ______ _____ __________ _____.
___ ______ ______ ____ ________ __________ _______ _______.
____ ______ ____ _____ ________ _________ _________ _____ ____ ___.
__________ __________ ___ _____ _______ _______ ___ __________ _______ __________.
__________ __________ __________ ______ ____ _________ __________ ____ ___.
Get Full Answer on WhatsApp