Domanda di colloquio di Morgan Stanley

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

Risposta di colloquio

Anonimo

2 ott 2014

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