"why the sizeof(bool) is not defined to be one, by the standard itself?" Code Answer

2

many platforms cannot effectively load values smaller than 32 bits. they have to load 32 bits, and use a shift-and-mask operation to extract 8 bits. you wouldn't want this for single bools, but it's ok for strings.

By faranjit on May 3 2022

Answers related to “why the sizeof(bool) is not defined to be one, by the standard itself?”

Only authorized users can answer the Search term. Please sign in first, or register a free account.