C++  MCQ


  • Admin
  • 18th Mar, 2023

C++ is an object-oriented programming language that is derived from C language. It is a high-level programming language that is used to program both hardware and software of computers. Its syntax matches with C programming language therefore it is also called the second version of C. It is powerful and has higher flexibility which is why most software programs are written in C++. Now it is one of the best choices for developers. Originally C++ was named C with Class.

Finally, Take the C++ MCQ Test, which is very helpful & important for the preparation of job interviews, exams, or placement drives.

C++ MCQ with Answers

1) Who is the founder of C++?

  • A. Dennis Ritchie
  • B.Bjarne Stroustrup
  • C.Microsoft Corporation
  • D.Tim Berners-Lee

2) C++ was first introduced in which year?

  • A. 1997
  • B.1998
  • C.1996
  • D.1995

3) What was the original name given to C++?

  • A. C with classes
  • B.C Language
  • C.C Sharp
  • D.None of the above

4) Which of the following sign is used for comments in C++?

  • A. /* comment */
  • B.// comment
  • C.// comment */
  • D.Both A & B

5) Which of the following function is used to read a single character from the console in C++?

  • A. getline(ch)
  • B.read(ch)
  • C.cin.get(ch)
  • D.scanf(ch)
Download Free : C++ MCQ PDF

6) .......... is an abstract data type.

  • A. float
  • B.int
  • C.class
  • D.string

7) Which of the following concept is used to implement late binding?

  • A. Constant functions
  • B.Operator functions
  • C.Virtual functions
  • D.Static functions

8) What is the correct size of a boolean variable in C++?

  • A. 1 bit
  • B.2 bytes
  • C.1 byte
  • D.None of the above

9) Which of the following loop is an exit-controlled loop?

  • A. for
  • B.while
  • C.do-while
  • D.None of the above

10) Which of the following is the other name of compile-time polymorphism?

  • A. Static polymorphism
  • B.Executing polymorphism
  • C.Dynamic polymorphism
  • D.Non-executing polymorphism

11) Std is a ........... in C++?

  • A. standard namespace
  • B.standard class
  • C.standard header file
  • D.standard file reading header

12) Which of the following feature of the OOPS gives the concept of reusability?

  • A. Inheritance
  • B.Abstraction
  • C.Encapsulation
  • D.None of the above

13) What is the default executable generation on UNIX for a C++ program?

  • A. a
  • B.a.out
  • C.out.a
  • D.a.exe

14) can we create objects of the abstract class?

  • A. Yes
  • B.No

15) Which of the followings are used to format the data display in CPP?

  • A. Allocators
  • B.Iterators
  • C.Manipulators
  • D.Punctuators

16) Which of the following are used for generic programming?

  • A. Inheritance
  • B.Templates
  • C.Virtual Functions
  • D.None of the above

17) The compiler does not support automatic type conversions for the ..............

  • A. User-defined data type
  • B.Basic data type
  • C.Class data type
  • D.None of the above

18) Which of the following is the other name of full specialization?

  • A. Implicit specialization
  • B.Explicit specialization
  • C.Function overloading template
  • D.None of the above

19) the client module imports ...........

  • A. Records
  • B.Interface
  • C.Macro
  • D.None of the above

20) Which of the following is the general syntax for accessing the namespace variable?

  • A. Namespace,operator
  • B.Namespace#operator
  • C.Namespaceid::operator
  • D.None of the above

21) Which of the following is always faster in writing on C++?

  • A. Deleting a file
  • B.Writing to a file
  • C.Writing to memory
  • D.Reading from the network

22) Which constant member functions does not modify the string?

  • A. delete
  • B.assign
  • C.append
  • D.bool empty()

23) Which will be used with physical devices to interact from C++ program?

  • A. Library
  • B.Streams
  • C.Iterators
  • D.Programs

24) Where does the member should be defined if it is used in the program?

  • A. Character scope
  • B.Directional scope
  • C.Namespace scope
  • D.Both Namespace & Character scope

25) What is the main feature of locale in C++?

  • A. Reliability
  • B.Portability
  • C.Sustainability
  • D.None of above

3 comment(s) :

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz