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
What does #define mean in c++?
Can you please explain the difference between using macro and inline functions?
What are the advantages of early binding?
How does list r; differs from list r();?
What is the difference between the indirection operator and the address of oper-ator?
Comment on local and global scope of a variable.
What is class in c++ with example?
Why do we use classes in c++?
How do you find out if a linked-list has an end?
Can you overload the operator+ for short integers?
What are the various storage classes in C++?
What are the extraction and insertion operators in c++?
What is helper in c++?
What is a singleton class c++?
Does c++ have arraylist?