Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



class X { private: int a; protected: X(){cout<<"X constructor was called&qu..

Answer / guest

only subclasses of X may create X objects.
i.e and B

Is This Answer Correct ?    4 Yes 0 No

class X { private: int a; protected: X(){cout<<"X constructor was called&qu..

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

Post New Answer

More C++ General Interview Questions

How do you show the declaration of a virtual constructor?

0 Answers  


What is input operator in c++?

0 Answers  


What is implicit pointer in c++?

0 Answers  


How would you implement a substr() function that extracts a sub string from a given string?

0 Answers  


What is the best c++ book?

0 Answers  


print first nodd numbers in descending order

7 Answers  


What are the types of container classes?

0 Answers  


Write any small program that will compile in "C" but not in "C++"

10 Answers   Honeywell,


What are the various compound assignment operators in c++?

0 Answers  


what is data encapsulation in C++?

0 Answers  


What is the hardest coding language to learn?

0 Answers  


Why is it difficult to store linked list in an array?

6 Answers   Infosys, Lucent,


Categories