C++ Programming Questions Answers - Set 2

  • 22. Can we define array of classes in c++ ?

    1. Yes
    2. No
    Answer :

    Option A

  • 23. An explicitly defined destructor function

    1. may be virtual
    2. may not be virtual
    3. will always be virtual
    4. will never be virtual
    Answer :

    Option A

  • 24. && means ?

    1. Logical OR
    2. Bitwise OR
    3. Logical AND
    4. Bitwise AND
    Answer :

    Option C

  • 25. How we can access data members using objects ?

    1. [email protected]
    2. object*datamember
    3. object->datamember
    4. object.datamember
    Answer :

    Option D

  • 26. What is true about Constructor ?

    1. Its name is plural of class name.
    2. Its name has * symbol before it.
    3. Its name is same as of class name.
    4. Its name has # symbol before it.
    Answer :

    Option C

  • 27. Which of the following keywords are used to control access to a class member ?

    1. protected
    2. switch
    3. goto
    4. for
    Answer :

    Option A

  • 28. Data members and member functions are enclosed within ?

    1. union
    2. structure
    3. class
    4. array
    Answer :

    Option C

Please Like Us