Classes & Objects
- Which is used to create a pure virtual function ?
-
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.
- Which constructor will initialize the base class data member?
-
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.
- Which class is used to design the base class?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
abstract class
- Which operator is used to declare the destructor?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
~
- Which is also called as abstract class?
-
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.