C++ Programming Multiple Choice questions(MCQ)
This section Present C++ MCQ which help you for Various interviews for placements entrance exams & competitive exams. The C++ Programming Multiple Choice questions(MCQ) are for beginner or fresher,IT Professional or Who are preparing for Exams.
1. Which header file is used to create the pseudo random generator?
a) random
b) cstdlib
c) rand
d) both random and cstdlib
Answer
2. How many parameters are available in srand function?
a) 1
b) 2
c) 3
d) 4
Answer
3. Which operator is used to produce a certain number in a specific range?
a) $
b) %
c) modulo operator
d) both % and modulo operator
Answer
4. Which can be used to create a random number without duplication?
a) Character
b) Time
c) Both Character & Time
d) None of the mentioned
Answer
5. 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
6. Which data type is used to represent the absence of parameters?
a) int
b) short
c) void
d) float
Answer
7. Which type is best suited to represent the logical values?
a) integer
b) boolean
c) character
d) all of the mentioned
Answer
8. Identify the user-defined types from the following?
a) enumeration
b) classes
c) both enumeration and classes
d) int
Answer
9. The value 132.54 can be represented using which data type?
a) double
b) void
c) int
d) bool
Answer
10. Pick the odd one out.
a) integer, character, boolean, floating
b) enumeration, classes
c) integer, enum, void
d) arrays, pointer, classes
Answer
For more Visit the Link:
Computer Science MCQ All Topic