C++ Multiple Choice Questions

  1. In object oriented programming, by wrapping up characteristics and behavior into one unit, we achieve
    1. Data Abstraction
    2. Data Encapsulation
    3. Data Hiding
    4. All of these
Answer :
B
Explanation:
Added By : Kiran Kumar


  1. Which of the following mode declaration is used in C++ to open a file for input?
    1. ios :: app
    2. in :: ios
    3. ios :: in
    4. ios :: file
Answer :
C
Explanation:
Added By : Virendra

  1. Which diagram provides a formal graphic notation for modelling objects, classes and their relationships to one another?
    1. Object Diagram
    2. Analysis Diagram
    3. Instance Diagram
    4. Class Diagram
Answer :
A
Explanation:
Added By : Rajat


  1. The mechanism that binds code and data together and keeps them secure from outside world is known as
    1. Abstraction
    2. Encapsulation
    3. Inheritance
    4. Polymorphism
Answer :
B
Explanation:
Added By : Rajat

  1. A Class can have how many destructor?
    1. 1
    2. 2
    3. 3
    4. 4
Answer :
A
Explanation:
Added By : Rachna

  1. The parameter list in function overloading must differ by?
    1. Number of functions
    2. Function Size
    3. Function Name
    4. Number of argument
Answer :
D
Explanation:
Added By : Rachna


  1. Data members is also called?
    1. Attribute
    2. Method
    3. Class
    4. Object
Answer :
A
Explanation:
Added By : Rachna

  1. In how many ways is polymorphism achived in C++?
    1. 2
    2. 3
    3. 1
    4. 4
Answer :
B
Explanation:
Operator overloading, Function overloading and Virtual functions.
Added By : Rachna

Post Your Question
Social Sharing
Search