I saw these question in our school's past paper, and I'm wondering if this is a valid question.
How big is
boolin C and C++?A) 1 bit
B) 4 bit
C) 8 bit
D) 1 byte
What is the smallest unit of memory C or C++ use?
A) 1 bit
B) 4 bit
C) 8 bit
D) 1 byte
The answer to both are D, but I am thinking if this is inappropriate.
EDIT: 1 byte is not necessarily 8 bits on some systems. See this StackOverflow post.
sizeof(T).typedef int bool;. I'm still fighting with a bigger project, that abuses that type to return other values than 0 or 1 from functions.