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 #include iostream in c++?
Explain the use of this pointer?
Explain differences between new() and delete()?
What does the following code do: int c=0; cout< a) Undefined *Updated* b) 01 c) 00
What is the full name of logo?
What is the difference between a pointer and a link in c ++?
what is c++
What is near, far and huge pointers? How many bytes are occupied by them?
What is the difference between the indirection operator and the address of oper-ator?
What does it mean to declare a destructor as static?
What is the difference between a reference and a pointer?
Write a program for Divide a number with 2 and Print the output ( NOTE: Check for divide by zero error).