In the programming languages C and C++, the unary operator sizeof generates the size of a variable or datatype, measured in the number of char - sized storage units required for the type. Consequently, the construct sizeof (char) is guaranteed to be 1. The actual number of bits of type char is specified by the preprocessor macro CHAR_BIT, defined in the standard include file limits. h. On most modern systems this is eight bits. The result has an unsigned integral type that is usually denoted by size_t.
what is the use of sizeof operator in c++
generates the size of a variable or datatype