Computer Science, asked by maham, 1 year ago

Pls send me source code: write a c program in 1.Add employee 2.Add Department 3.Assign an employee to a deptment with start and end date 4.Exit Employee:(Employee.txt) 1,e.number->(Auto numbering) 2,e.name 3,e.age->20 to 58 4,e.city Department:(department.txt) 1,d.number 2,d.name Emp-Dept:(empdept.txt) 1,e.number->name 2,d.number->name 3,Start date 4,End date

Answers

Answered by bmohankumar
1
#include <stdio.h>
#include <conio.h>
struct details{ 
char name[30]; 
int age; 
char address[500]; 
float salary;
};
int main()

struct details detail; 
clrscr();
printf("\nEnter name:\n");
 gets(detail.name); 
printf("\nEnter age:\n"); 
scanf("%d",&detail.age);
 printf("\nEnter Address:\n"); 
gets(detail.address);
 printf("\nEnter Salary:\n"); 
scanf("%f",&detail.salary);
 printf("\n\n\n"); 
printf("Name of the Employee : %s \n",detail.name); 
printf("Age of the Employee : %d \n",detail.age); 
printf("Address of the Employee : %s \n",detail.address); 
printf("Salary of the Employee : %f \n",detail.salary);
 getch();
}
Similar questions