What is a Structures | How to define Structures | C Language Tutorial
8 هزار بار بازدید -
4 سال پیش
-
In this tutorial you will
In this tutorial you will learn what is a Structure in C Programming language, How to define structures and use them in detail with example.
A Structure is a collection of related variables under one name. When we define a structure in our C Program, we get a new datatype which can contain variables of different datatypes.
Structures are called as derived datatypes because they are created by using other types available in the language.
To define a structure we use the keyword struct.
The syntax is as follows.
struct structure_tag{
structure member1;
structure member2;
....
};
After that we can create the variables from the structure that we have defined.
To access the members of a structure using structure variable we use . ( dot operator ) also called as structure member operator.
Our Website
http://www.LearningLad.com
Social Media
Facebook Facebook: LearningLad
twitter Twitter: LearningLadEdu
Instagram Instagram: LearningLadOfficial
A Structure is a collection of related variables under one name. When we define a structure in our C Program, we get a new datatype which can contain variables of different datatypes.
Structures are called as derived datatypes because they are created by using other types available in the language.
To define a structure we use the keyword struct.
The syntax is as follows.
struct structure_tag{
structure member1;
structure member2;
....
};
After that we can create the variables from the structure that we have defined.
To access the members of a structure using structure variable we use . ( dot operator ) also called as structure member operator.
Our Website
http://www.LearningLad.com
Social Media
Facebook Facebook: LearningLad
twitter Twitter: LearningLadEdu
Instagram Instagram: LearningLadOfficial
4 سال پیش
در تاریخ 1399/03/29 منتشر شده
است.
8,007
بـار بازدید شده