Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What does sizeof mean in C language?
What does sizeof mean in C language?
Sizeof is a reserved keyword in C language, and it can also be regarded as an operator and a monocular operator.

In Pascal language, sizeof () is a memory capacity measurement function, whose function is to return the size of a variable or type (in bytes); In C language, sizeof () is an operator to judge data type or expression length.

In Pascal and C languages, the processing of sizeof () is carried out in the compilation stage.

Related definition

Sizeof is an operator in C/C++. Simply put, its function is to return the number of memory bytes occupied by an object or type.

The explanation of MSDN is:

Sizeof keyword gives the amount of storage associated with a variable or type (including aggregate type), in bytes. This keyword returns a value of type size _ t.

Its return value type is size_t, which is defined in the header file stddef.h