Data Types MCQs

100 MCQs  (Page 1 of 10)

Practice Data Types MCQs with correct answers and explanations. Browse subtopics below or start a practice quiz.

In C++, what is sizeof(char)?
Always 8
Always 1, by definition
Depends on the compiler (1, 2, or 4)
2 on Unicode systems
What does the C++ standard guarantee about the size of int?
Exactly 32 bits
The same size as a pointer
Exactly 4 bytes
At least 16 bits
In C and C++, is plain char signed or unsigned?
Implementation-defined
Always signed
Always unsigned
Signed in C, unsigned in C++
In Java, how wide is the char type?
32 bits
8 bits
16 bits (a UTF-16 code unit)
Platform-dependent
In VB6 (classic Visual Basic), what are the sizes of Integer and Long?
Integer is 16 bits; Long is 32 bits
Integer is 8 bits; Long is 16 bits
Integer is 32 bits; Long is 64 bits
Both are 32 bits