C Structure Declaration
We have to declare structure in C before using it in our program. In structure declaration, we specify its member variables along with their datatype. We can use the struct keyword to declare the structure in C using the following syntax:
Syntax
struct structure_name { data_type member_name1; data_type member_name1; .... .... };
The above syntax is also called a structure template or structure prototype and no memory is allocated to the structure in the declaration.
C Structures
The structure in C is a user-defined data type that can be used to group items of possibly different types into a single type. The struct keyword is used to define the structure in the C programming language. The items in the structure are called its member and they can be of any valid data type.