C++ Multiple Choice Questions

  1. Which of the following operator(s) cannot be overloaded?
    1. . (Member Access or Dot operator)
    2. ?: (Ternary or Conditional Operator )
    3. :: (Scope Resolution Operator)
    4. All of the above
Answer :
D
Explanation:
Added By : Shradha


  1. Which of the following cannot be passed to a function in C++?
    1. Constant
    2. Structure
    3. Array
    4. Header file
Answer :
D
Explanation:
Added By : Kaur

  1. Which of the following storage classes have global visibility in C++?
    1. Register
    2. Static
    3. Auto
    4. Extern
Answer :
D
Explanation:
Added By : Deepak


  1. When a method in a subclass has the same name and type signatures as a method in the superclass, then the method in the subclass _____ the method in the super class.
    1. Overloads
    2. Friendships
    3. Inherits
    4. Overrides
Answer :
D
Explanation:
Added By : Rahul

  1. Which of the following is not a member of class?
    1. Static function
    2. Friend function
    3. Const function
    4. Virtual function
Answer :
C
Explanation:
Added By : Saurabh

  1. C++ can be said to be as C language with
    1. Structures
    2. Functions
    3. Classes
    4. Global data
Answer :
C
Explanation:
Added By : Vijayy


  1. _________ allows to create classes which are derived from other classes, so that they automatically include some of its "parent's" members, plus its own members.
    1. Overloading
    2. Inheritance
    3. Polymorphism
    4. Encapsulation
Answer :
B
Explanation:
Added By : Anshul

  1. Important advantage of using new and delete operators in C++ is
    1. Allocation of memory
    2. Frees the memory previously allocated
    3. Allocation of memory and frees the memory previously allocated
    4. Initialization of memory easily
Answer :
C
Explanation:
Added By : Anshul

Post Your Question
Social Sharing
Search