A good interview question based on a C++ polymorphism in oops

C++ Technical Interview Question on polymorphism in oops Write a complete class stating function overriding feature in C++ Show the function call in main program. Explain the concept of function overriding. Take example of drawing multiple shapes e.g. circle and rectangle etc. Interviewer Intent: Read more →

How to stop class inheritance in C++ with condition that object creation should be allowed

Answer includes multiple solutions to stop or prevent class inheritance in C++ with condition that object creation of the class should be allowed with C++ program example and explanation. Interview Question: I want to stop a class to be inherited and allow to create Read more →

Use of Public Private and Protected access specifiers in C++?

Answer: Use of public private and protected access specifiers in C++ is to control the access/visibility of member data and functions out of a class. It all depends upon requirement when we design a class, what access level to fields and member functions, we want Read more →