-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathEmployee.c
More file actions
32 lines (26 loc) · 824 Bytes
/
Employee.c
File metadata and controls
32 lines (26 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include<stdio.h>
#include<string.h>
struct employe
{
int code;
char name[30];
char department[50];
float salary;
};
void main()
{
struct employe employee;
printf("Enter Employee Code:\n");
scanf("%d",&employee.code);
printf("Enter Employee's Name:");
scanf("%[^\n]%*c",employee.name);
printf("Enter Employee's Department:");
scanf("%[^\n]%*c",employee.department);
printf("Enter Employee's salary:\n");
scanf("%f",&employee.salary);
printf("\n\n Particulars of Employee:");
printf("\n Employee's code:%d",employee.code);
printf("\n Employee's Name:%s",employee.name);
printf("\n Employee's Department:%s",employee.department);
printf("\n Employee's Salary:%f",employee.salary);
}