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


Please Help Members By Posting Answers For Below Questions

Does c++ have a hash table?

539


What is a hashmap c++?

568


Why is c++ awesome?

575


Which is not a valid keyword a) public b) protected c) guarded

740


What does #define mean in c++?

611






Which operations are permitted on pointers?

566


What is buffer and example?

523


which operator is used for performing an exponential operation a) > b) ^ c) none

602


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.

2436


What is low level language in simple words?

559


What is class and structure in c++?

556


What is a stack c++?

567


Write a recursive program to calculate factorial in c++.

607


What does it mean to declare a member function as virtual?

583


What is the use of class in c++?

567