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

What does #define mean in c++?

761


Can you please explain the difference between using macro and inline functions?

624


What are the advantages of early binding?

700


How does list r; differs from list r();?

787


What is the difference between the indirection operator and the address of oper-ator?

702






Comment on local and global scope of a variable.

671


What is class in c++ with example?

658


Why do we use classes in c++?

678


How do you find out if a linked-list has an end?

757


Can you overload the operator+ for short integers?

689


What are the various storage classes in C++?

749


What are the extraction and insertion operators in c++?

662


What is helper in c++?

654


What is a singleton class c++?

630


Does c++ have arraylist?

637