Larsen & Toubro interview question

Inheritance concept explanation with example