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
State two differences between C and C++.
Explain function overloading and operator overloading.
What is ostream in c++?
What is enum class in c++?
Is map thread safe c++?
How the keyword struct is different from the keyword class in c++?
If you push the numbers (in order) 1, 3, and 5 onto a stack, which pops out first a) 1 b) 5 c) 3
What are pointer-to-members? Explain.
What is the disadvantage of using a macro?
What is the v-ptr?
What are the manipulators in c++?
Will c++ be replaced?
What do you mean by static variables?
How do I tokenize a string in c++?
What is capacity in vector in c++?