Posts

Showing posts from May 9, 2013

C++ : Interview Questions on "Types"

Here is a listing of C++ interview questions on “Types” along with answers, explanations and/or solutions: 1. What is the size of wchar_t in C++? a) 2 b) 4 c) 2 or 4 d) based on the number of bits in the system Answer:d Explanation:Compiler wants to make CPU as more efficient in accessing the next value. 2. Pick the odd one out a) array type b) character type c) boolean type d) integer type Answer:a Explanation:array type is not the basic type and it is constructed using the basic type. 3. which datatype is used to represent the absence of paramaters? a) int b) short c) void d) float Answer:c Explanation:void will not return anything. 4. What does a escape code represent? a) alert b) backslash c) tab d) form feed Answer:a Explanation:Because a is used to produce a beep sound. 5. Which type is best suited to represent the logical values? a) integer b) boolean c) character d) all of the mentioned Answer:b Explanation:Logical values can b