Pergunta de entrevista da empresa Cognizant

Difference between heap and stack