What is the benefit of encapsulation?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C++ General Interview Questions

What is the C-style character string?

0 Answers  


Which compiler does turbo c++ use?

0 Answers  


How do we implement inheritance in c++?

0 Answers  


Who was the creator of c++?

0 Answers  


What is the use of default constructor?

0 Answers  






Differentiate between realloc() and free().

0 Answers  


Should I learn c or c++ first?

0 Answers  


What are stacks?

0 Answers  


Define a nested class. Explain how it can be useful.

0 Answers  


What do you mean by translation unit?

0 Answers  


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

1 Answers  


Write about the retrieval of n number of objects during the process of delete[]p?

0 Answers  


Categories