Classes & Objects


  1. Which operator is used to declare the destructor?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    ~


  1. Which constructor will initialize the base class data member?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    Because it is having the proper data set to initialize, Otherwise it will throw a error.



  1. Which class is used to design the base class?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    abstract class


  1. Which is used to create a pure virtual function ?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    For making a method as pure virtual function, We have to append ‘=0’ to the class or method.



  1. Which is also called as abstract class?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    Classes that contain at least one pure virtual function are called as abstract base classes.