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 define a class in c++?

0 Answers  


Can turbo c++ run c program?

0 Answers  


What is private inheritance?

0 Answers  


Write a single instruction that will find the remainder of integral division when x is divided by y. Have the answer stored in z.

1 Answers  


How can we access protected and private members of a class?

0 Answers  


tell me about yourself ?i want answer for frehers with various exasmples?

2 Answers   HCL,


What will happen if I allocate memory using "new" and free it using "free" or allocate sing "calloc" and free it using "delete"?

3 Answers  


What is a local reference?

0 Answers  


What is the difference between a copy constructor and an overloaded assignment operator?

4 Answers   Belzabar, Citrix, Microsoft, Wipro,


How the programmer of a class should decide whether to declare member function or a friend function?

0 Answers  


Write a program which uses Command Line Arguments

0 Answers  


What is static class data?

0 Answers  


Categories