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 |
write a program to insert an element into an array
How will you call C functions from C ++ and vice-versa?
0 Answers Agilent, Tavant Technologies, Thomson Reuters, Verifone,
What is problem with Runtime type identification?
How can we access protected and private members of a class?
Write a program using GUI concept for the scheduling algorithms in Operating system like SJF,FCFS etc..
What operator is used to access a struct through a pointer a) >> b) -> c) *
How do I open binary files?
What is a responder chain?
What does override mean in c++?
How many keywords are used in c++?
What is dangling pointers?and what is memory leak?
Difference between pass by value and pass by reference?