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.
Answers were Sorted based on User's Feedback
Answer / guest
only subclasses of X may create X objects.
i.e and B
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / shakti singh khinchi
Only subclasses of X may create X objects.
means (b) is the only answer.
| Is This Answer Correct ? | 2 Yes | 0 No |
What is difference between malloc()/free() and new/delete?
What do you know about near, far and huge pointer?
What is encapsulation in C++? Give an example.
0 Answers HAL, Honeywell, Zomato,
Show the declaration for a pointer to function returning long and taking an integer parameter.
What are the types of pointer?
What is function prototyping? What are its advantages?
What does ios :: app do in c++?
What is cloning?
What is meant by iomanip in c++?
What are the four partitions in which c++ compiler divides the ram?
What are the debugging methods you use when came across a problem?
When should we use multiple inheritance?