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
Does c++ have a hash table?
What is a hashmap c++?
Why is c++ awesome?
Which is not a valid keyword a) public b) protected c) guarded
What does #define mean in c++?
Which operations are permitted on pointers?
What is buffer and example?
which operator is used for performing an exponential operation a) > b) ^ c) none
Snake Game: This is normal snake game which you can find in most of the mobiles. You can develop it in Java, C/C++, C# or what ever language you know.
What is low level language in simple words?
What is class and structure in c++?
What is a stack c++?
Write a recursive program to calculate factorial in c++.
What does it mean to declare a member function as virtual?
What is the use of class in c++?