Posts

Showing posts with the label Structure

Defining a Structure

Defining a StructureDefining a Structure is a process of creating the skeleton of physical object that can be understood by compiler .It consists of Structure name and the description of it’s member(property).

Definition of a structure creates a template are format that describes the characteristics of it’s member .

The general syntax of a structure definition is:
Struct structurename{ Datatype member1; Datatype member2; ………………………………….. Datatype membern; };Here struct is a keyword , which tells the compiler that a structure is being defined . member1 , member2 ,………,membern are the member of structure and are declared inside curly bracket .
There should be a semicolon at the end of the curly braces

These member can be of any data type like int , char , float , array , pointer or another structure

Structurename is the name of the structure and is used further in the program to declare Structure var…

Structure Learning for both novices and advanced programmers

Image
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?In programming structure is the collection of various data of different data type. We can connect it with the class of java or other OOP language. As class has object which have property and method, But here we have an object and its property or value.

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?
Structure is used for data handling operation.
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 logical…