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

What are the two types of polymorphism?

0 Answers  


What is binary search in c++?

0 Answers  


Program to check whether a word is a sub-string or not of a string typed

0 Answers  


What is a vector c++?

0 Answers  


Explain abstraction.

0 Answers  


What is the basic structure of a c++ program?

0 Answers  


How delete [] is different from delete?

0 Answers  


What is the most common mistake on c++ and oo projects?

0 Answers  


What is fixed in c++?

0 Answers  


How can we check whether the contents of two structure variables are same or not?

0 Answers  


What are different types of polymorphism supported by C++

2 Answers   CA, GameLoft,


Why can’t you call invariants() as the first line of your constructor?

0 Answers  


Categories