Capgemini interview question

oops concepts and C++ programs