1.

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 dependentI got this question in unit test.My query is from Character Types topic in chapter Types, Pointers, Arrays & Structures in C++ of C++

Answer»

Correct option is (b) 1

The BEST I can EXPLAIN: The STANDARD does NOT require a char to be 8-bits, but does require that sizeof(char) RETURN 1.



Discussion

No Comment Found

Related InterviewSolutions