Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - C language structure definition
C language structure definition
C language structure definition: struct is the keyword of the structure, tag is the symbol of the structure, and member-list is the member list of the structure, and all its members must be listed; Variable- Lists the variables declared for this structure.

Structure is an aggregate data type in C language. Structures can be declared as variables, pointers or arrays to achieve more complex data structures. A structure is also a collection of elements, which are called members of a structure. These members can be of different types, and members are generally accessed by name.

Extended data

1 and struct are keywords that must be used when declaring structural types and cannot be omitted. The word "structure" is translated from the English word structure.

2.structSTUDENT is the name of the defined data type, which declares to the compilation system that it is a "structural type", including different types of items such as name, num, gender, age, score and addr.

3.structSTUDENT, like the standard type names such as int, char, float and double provided by the system, is a data type with the same function and is used to define variables.

Baidu Encyclopedia-Structure