-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbday.c
More file actions
62 lines (40 loc) · 851 Bytes
/
Copy pathbday.c
File metadata and controls
62 lines (40 loc) · 851 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include<stdio.h>
struct date{
int dd,mm,yy;
};
struct emp{
char name[20];
int empid;
struct date dob;
struct date joining;
struct emp *node;
// int dob_dd,dob_mm,dob_yy;
// int join_dd,join_mm,join_yy;
};
int main()
{
struct emp e1,e2;
struct emp *ptr=NULL;
ptr=&e1;
printf("Enter Name");
scanf("%s",e1.name);
printf("Enter EID");
scanf("%d",&e1.empid);
printf("Enter DOB Date");
scanf("%d",&e1.dob.dd);
printf("Enter DOB Month");
scanf("%d",&e1.dob.mm);
printf("Enter DOB Year");
scanf("%d",&e1.dob.yy);
printf("Enter Join Date");
scanf("%d",&e1.joining.dd);
printf("Enter Join Month");
scanf("%d",&e1.joining.mm);
printf("Enter Join Year");
scanf("%d",&e1.joining.yy);
printf("%s\n",(*ptr).name);
printf("%s\n",ptr->name);
printf("%d\n",(*ptr).empid);
printf("%d\n",ptr->empid);
return 0;
}