Does sizeof return the number of bytes or the number of octets of a type in C?
Answer: sizeof returns the size of the type in bytes. Example: sizeof(char) is 100% guaranteed to be 1, but this does not mean, that it’s one octet (8 bits). Proved by the standard: in 6.5.3.4, point 2: The sizeof operator yields the size (in bytes) of its operand, which may be an expression or the parenthesized name of a type. The … Read more