MCQ Computer Science

C++ Programming Multiple Choice questions(MCQ)

Welcome to the C++ Programming MCQ section! This collection of Multiple Choice Questions (MCQs) is designed to help you prepare for various interviews, placement exams, entrance tests, and competitive exams. Whether you’re a beginner or fresher, an IT professional, or someone preparing for exams, these C++ MCQs will strengthen your understanding of C++ programming concepts and enhance your problem-solving skills.


Why Practice C++ MCQs?

  • Interview Preparation: Ace technical interviews with confidence.
  • Exam Readiness: Ideal for competitive exams and university tests.
  • Skill Enhancement: Master C++ fundamentals and advanced topics.
  • Beginner-Friendly: Perfect for freshers and beginners in programming.

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