Question-51. What are available mode of inheritance to inherit one class from another ?
Answer-Public, Private and Protected.
Question-52. What is the difference between delete and delete[] ?
Answer- Delete[] is used to release the array allocated memory which was allocated using new[] and delete is used to release one chunk of memory which was allocated using new.
Question-53. Does an abstract class in C++ need to hold all pure virtual functions ?
Answer- Not necessarily, a class having at least one pure virtual function is abstract class too.
Question-54. Is it legal to assign a base class object to a derived class pointer ?
Answer- No, it will be error as the compiler fails to do conversion.
Question-55. What is function overriding ?
Answer- Defining the functions within the base and derived class with the same signature and name where the base class’s function is virtual.
Question-56. Are the exceptions and error same? ?
Answer- No, exceptions can be handled whereas program cannot resolve errors.
Question-57. Which function is used to move the stream pointer for the purpose of reading data from stream ?
Answer- seekg()
Question-58. Which function is used to move the stream pointer for the purpose of writing data from stream ?
Answer- seekp()
Question-59. Are class functions taken into consideration as part of the object size ?
Answer- No, only the class member variables determines the size of the respective class object.
Question-60. Can we create and empty class? If so what would be the size of such object ?
Answer- We can create an empty class and the object size will be 1.