Posts

Showing posts from August, 2025

Employee record management in C

               Let us create a employee record management in C. A employee record has name, id and salary. The operations are adding the details, search an employee, delete a record and display the employee records. Program implementation: #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX 100 struct Employee {     int e_id;     char e_name[50];     float e_salary; }; struct Employee emp[MAX]; int count = 0; void addEmployee() {     printf("\nEnter the Employee id: ");     scanf("%d", &emp[count].e_id);     printf("Enter the Employee Name: ");     scanf(" %[^\n]", emp[count].e_name);     printf("Enter the salary: ");     scanf("%f", &emp[count].e_salary);     count++;     printf("Employee details ar...