Class 01 DataT Ypes and Structures
Class 01 DataT Ypes and Structures
Chapter 1
struct record{
char name[20] ;
int age;
float avg;
};
main(){
record student;
cout<<"Enter your name :";
cin>> student.name;
cout<<"Enter your age :";
cin>> student.age;
cout <<"\n your name is : " << student.name;
cout <<"\n your age is : " << student.age;}
Data Structures Slide 5 of 24
Data Structure
• Data structure is a particular way of storing and organizing
data in a computer so that it can be (searched, processed,
or modified) efficiently.
Non-Linear
Homogenous
Non-homogenous
Dynamic
Static
Now it does not matter if there are 100, 1000 or 10,000 elements !!!
You can use additional braces to indicate when rows start and
end:
Row 0 8 16 9 52
Row 1 3 15 27 6
6
Row 2 14 25 2 10