Pergunta de entrevista da empresa Cognizant

What is inheritance and its types?