class X
{
private:
int a;
protected:
X(){cout<<"X constructor was called"<<endl;}
~X(){cout<<"X destructor was called"<<endl}
};
Referring to the code above, which one of the following
statements regarding "X" is TRUE?
a) X is an abstract class.
b) Only subclasses of X may create X objects.
c) Instances of X cannot be created.
d) X objects can only be created using the default copy
constructor.
e) Only friends can create instances of X objects.
Answer Posted / guest
only subclasses of X may create X objects.
i.e and B
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
List the types of polymorphism in c++?
Differentiate between an external iterator and an internal iterator? What is the advantage of an external iterator.
What do you mean by storage classes?
What is std namespace in c++?
Explain the use of vtable.
Should the member functions which are made public in the base class be hidden?
How can a struct in c++ differs from a struct in c?
Will a recursive function without an end condition every quit, in practice a) Compiler-Specific (Some can convert to an infinite loop) b) No c) Yes
Why do we use iterators?
Which software is used to run c++ program?
Why namespace is used in c++?
Write a note about the virtual member function?
What is data abstraction? How is it different from data encapsulation?
What are the c++ access specifiers?
How can you differentiate between inheritance and implementation in c++?