Tech Mahindra interview question

About Classes in cpp, and some basic stuff in c.