Pergunta de entrevista da empresa Morgan Stanley

How to detect where a variable is allocated (HEAP or STACK).

Resposta da entrevista

Sigiloso

2 de out. de 2014

Value-Typed variables are stored in Stack (int, double, char, ...) whereas Reference-Typed variables (arrays, strings ...) are stored in the Heap.