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
Describe new operator and delete operator?
What is using namespace std in c++?
What flag means?
What is the meaning of c++?
Why struct is used in c++?
Explain what are single and multiple inheritances in c++?
Is empty stack c++?
What are mutator methods in c++?
What are the two types of polymorphism?
Is c++ low level?
What is the difference between strcpy() and strncpy()?
Discussion on error handling of C++ .
What are disadvantages of pointers?
Which software is best for programming?
What is the use of setfill in c++?