C++ Programming Questions Answers - Set 2

  • 15. The function used to define the task assigned to an operator is ?

    1. Virtual function
    2. Static function
    3. Operator function
    4. Friend function
    Answer :

    Option C

  • 16. The symbol ** __ .

    1. can be overloaded by changing its datatype.
    2. cannot be overloaded, as on overloading its meaning shall be changed.
    3. can be overloaded.
    4. cannot be overloaded as it is not a C++ operator.
    Answer :

    Option D

  • 17. The objects can directly access ?

    1. Public members
    2. Private members
    3. Both of above
    4. None of above
    Answer :

    Option A

  • 18. Among following which will give the size of object or type ?

    1. Calloc
    2. Malloc
    3. Sizeof
    4. Realloc
    Answer :

    Option C

  • 19. How we can define member function outside the class ?

    1. Using union
    2. Using structure
    3. Using pointers
    4. Using scope resolution
    Answer :

    Option D

  • 20. When a derived class inherits from many base classes, this process is known as ?

    1. multiple inheritance
    2. multilevel inheritance
    3. default inheritance
    4. multiplex inheritance
    Answer :

    Option A

  • 21. 66. A constructor function is generally defined

    1. In the private section of a class
    2. In the public section of a class
    3. In the protected section of a class
    4. None of the above
    Answer :

    Option B

Please Like Us