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 A {
public:
void f();
protected:
A() {}
A(const A&){}
};

Examine the class declaration shown above. Why are the
default and copy constructors declared as protected?

1. To ensure that A cannot be created via new by a more
derived class
2. To ensure that A cannot be copied
3. To ensure that A cannot be used as a base class except
when public inheritance has been used
4. To ensure that A cannot be created/copied outside the
inheritance chain
5. To ensure that A cannot be instantiated as a static variable



class A { public: void f(); protected: A() {} A(const A&){} }; Examine the ..

Answer / prasenjit roy

4. To ensure that A cannot be created/copied outside the
inheritance chain

Is This Answer Correct ?    6 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is the latest version on c++?

0 Answers  


Write some differences between an external iterator and an internal iterator? Describe the advantage of an external iterator.

0 Answers  


What is a driver program?

0 Answers  


Do the names of parameters have to agree in the prototype, definition, and call to the function?

0 Answers  


How do I get good at c++ programming?

0 Answers  


Can you be bale to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?

0 Answers  


what kind of projects are suitable for c and c++

0 Answers  


What is a sequence in c++?

0 Answers  


Explain what is class definition in c++ ?

0 Answers  


Explain the auto storage classes in c++.

0 Answers  


difference between the c++ and c languages

4 Answers   Wipro,


What is a stack? How it can be implemented?

0 Answers  


Categories