-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEx 2A...Structures.cpp
More file actions
32 lines (32 loc) · 984 Bytes
/
Copy pathEx 2A...Structures.cpp
File metadata and controls
32 lines (32 loc) · 984 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<iostream>
#include<conio.h>
#include<stdio.h>
using namespace std;
struct bio
{
char name[20];
int age;
float sal;
char designation[20];
};
int main()
{
int i;
struct bio info[2];
for(int i=0;i<2;i++)
{
cout<<"Enter the data : name, age, salary, designation"<<endl;
cin>>info[i].name>>info[i].age>>info[i].sal>>info[i].designation;
}
for(i=0;i<2;i++)
{
cout<<"Given Data for obj["<<i<<"]:- "<<endl;
cout<<"+++++++++++++++++++++++++++\n";
cout<<"Name : "<<info[i].name<<endl;
cout<<"Age : "<<info[i].age<<endl;
cout<<"Salary : "<<info[i].sal<<endl;
cout<<"Address : "<<info[i].designation<<endl;
}
cout<<"Size of the structure Student is :"<<sizeof(info[0]);
getch();
}