Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Structure: What does this mean in C language?
Structure: What does this mean in C language?
A structure is a data set composed of a series of data of the same type or different types, also known as a structure. In C language, you can define structural types and encapsulate multiple related variables into a whole. In object-oriented programming, objects have states (attributes) and behaviors. States are stored in member variables, and behaviors are implemented by member methods (functions).

Structure struct is implemented in the same way as array, that is, it directly addresses the access of each member. Variables in a structure can be the same, partially the same or completely different data types. In C language, structures cannot contain functions.

Extended data:

In C language, structures cannot contain functions. In object-oriented programming, objects have states (attributes) and behaviors. States are stored in member variables, and behaviors are implemented by member methods (functions). The structure in C language can only describe the state of an object, but not its behavior.

Baidu Encyclopedia-Structure