C++ Programming Questions Answers - Set 2

  • 1. Classes in c++ are ?

    1. Fundamental data type
    2. Primitive data type
    3. Desired data type
    4. Not defined
    Answer :

    Option C

  • 2. What is data hiding ?

    1. It is related with hiding internal object details
    2. It is related with showing internal object details
    3. It is related with datatypes
    4. None of above
    Answer :

    Option A

  • 3. A virtual base class ?

    1. is qualified as virtual in base class definition.
    2. do not qualified as virtual in base class definition.
    3. allows to inherit more than one copy of the base class members.
    4. strict the path of inheritance.
    Answer :

    Option A

  • 4. What is actual syntax of destructor in c++ ?

    1. !Classname( )
    2. @Classname( )
    3. $Classname( )
    4. ~Classname( )
    Answer :

    Option D

  • 5. Inheritance is referred to as

    1. “is a” relationship
    2. "have a" relationship
    3. both of above
    4. none of above
    Answer :

    Option A

  • 6. Operator overloading is ?

    1. giving new meaning to existing c++ operators
    2. making c++ operators work with objects
    3. giving c++ operators more than they can handle
    4. making new c++ operators
    Answer :

    Option A

  • 7. Which among following is not a valid visibility mode in c++ program ?

    1. Private
    2. Public
    3. Protected
    4. Limited
    Answer :

    Option D

Please Like Us