MCQ Computer Science

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

Answer: d 

2. How many parameters are available in srand function?
a) 1
b) 2
c) 3
d) 4

Answer

Answer: a

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

Answer: d

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

Answer: b

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

Answer: d

6. Which data type is used to represent the absence of parameters?
a) int
b) short
c) void
d) float

Answer

Answer: c

7. Which type is best suited to represent the logical values?
a) integer
b) boolean
c) character
d) all of the mentioned

Answer

Answer: b

8. Identify the user-defined types from the following?
a) enumeration
b) classes
c) both enumeration and classes
d) int

Answer

Answer: c

9. The value 132.54 can be represented using which data type?
a) double
b) void
c) int
d) bool

Answer

Answer: a

10. Pick the odd one out.
a) integer, character, boolean, floating
b) enumeration, classes
c) integer, enum, void
d) arrays, pointer, classes

Answer

Answer: c

For more Visit the Link:

Computer Science MCQ All Topic

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button