Pregunta de entrevista de Cognizant

Difference between heap and stack