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
Why do we use classes in c++?
Is c++ a low level language?
What is #include cstdlib in c++?
What are the four main data types?
What is the use of volatile variable?
What is the best ide for c++?
What is a base class?
Explain the term memory alignment?
What is function prototyping?
Write a program to find the Fibonacci series recursively.
Can constructor be private in c++?
What gives the current position of the put pointer?
When do we run a shell in the unix system? How will you tell which shell you are running?
What is the benefit of c++?
What do you understand by zombie objects in c++?