Quiz 2
Quiz 2
c. Saving the full state of an object (including private and protected members) in a binary file
d. Accessing the private fields of an object which is declared as a field inside another class
4. Choose the appropriate option(s). [5 M]
Which statements are true about an abstract class?
a) Abstract class has at least one pure virtual function. b) Pointer for an abstract class can be created
c) Object of an abstract class cannot be created. d) All are correct
In a class, pure virtual function is used
a) To create an interface b) To make a class abstract
c) To force derived class to implement the pure virtual function d) All the above
Which is/are the correct declaration(s) of pure virtual function in C++?
virtual void func= 0; b) virtual void func()= 0; c) virtual void func(){0}; d) void fun()=0;
If inner catch block is unable to handle the exception thrown then
Program stops abnormally
The compiler will check for appropriate catch handler of the outer try block
The compiler will not check for appropriate catch handler of the outer try block
The unexpected() function is called
Which of the following is not used as a file opening mode?
ios::trunk b) ios::binary c) ios::in d) ios::ate e) All of these