-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path15.cpp
61 lines (50 loc) · 873 Bytes
/
15.cpp
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
#include <iostream>
#include <string>
using namespace std;
struct employee
{
int ID;
string surname;
float salary;
};
typedef struct bloodbank
{
int age;
string Bg;
float Mob;
} bb;
union money
{
int rice; // 4
char car; // 1
float pounds; // 4
};
int main()
{
struct employee Vraj;
Vraj.ID = 1;
Vraj.surname = "Shah";
Vraj.salary = 5000;
cout << Vraj.surname << endl;
bb Shah;
Shah.age = 18;
Shah.Bg = "A+";
Shah.Mob = 9484638348;
cout << Shah.Mob << endl;
union money m1;
m1.rice = 34;
cout << m1.rice << endl;
m1.car = 'c';
cout << m1.rice << endl;
cout << m1.car << endl;
enum Meal
{
Breakfast,
Lunch,
Dinner
};
cout << Breakfast << endl;
cout << Lunch << endl;
cout << Dinner << endl;
return 0;
}