Explanation: In C++, sizeof(‘a’) == sizeof(char) == 1. In C however, sizeof(‘a’) == sizeof(int). 9. Suppose in a hypothetical machine, the size of char is 32 bits. What would sizeof(char) return?
A. 4
B. 1
C. Implementation dependent
D. Machine dependent
Answer:A
Explanation: In C++, sizeof(‘a’) == sizeof(char) == 1. In C however, sizeof(‘a’) == sizeof(int). 9. Suppose in a hypothetical machine, the size of char is 32 bits. What would sizeof(char) return?
A. 4 B. 1 C. Implementation dependent D. Machine dependent
Explanation: The standard does NOT require a char to be 8-bits, but does require that sizeof(char) return 1.