KPIT Technologies interview question

Opps concept in cpp language