Structure Learning for both novices and advanced programmers
StructureThe meaning of structure is the quality of being organized in general term. To understand the structure in programming language you must be able to link it with general meaning
- 1) How can we link it with general meaning?
- 2) What is structure in c?
Structure helps to bring real physical object into virtual computer world.
A simple structure can be
Student with property 1) Name 2) Roll number 3) Age etc.
- 1) How structure is different from array and variable?
- 2) What is advantage of structure?
It can be good to think that there are already other syntax that can handle data, then why is the need of Structure.
The main advantage of structure is that it can group different types of logically related data .
For example if you want to create a record of a person that contains name, age and height of that person, then we can’t use array because all the three data elements are of different data types.
To store these related fields of different data types we can use a structure, which is capable of storing heterogeneous data.
Data of different types can be grouped together under a single name using structure.
The data elements of a structure are referred to as member (property)
You can Browse related article below for more information and program code related to Structure Does above is helpful , Post you views in comment