I was reading Bruce Eckel's Thinking in C++, which said that
"A char is for character storage and uses a minimum of 8 bits (one byte) of storage, although it may be larger. "
This is inconsistent with another book that I read, Programming in C++ by Nell Dale et al., which states that
"Then by definition, sizeof(char) = 1
The only guarantee made by the C++ language is that:
1 = sizeof(char) <= sizeof(short) <= sizeof(int) <= sizeof(long)
sizeof(float) <= sizeof(double) <= sizeof(long double) "
Which is which?
0 · ·