Question d’entretien chez Bloomberg

char s = "Hello"; .... If this statement is within a function and the pointer is returned .. will it print the string in the calling function; This led to a discussion as to where in the memory the string gets stored etc.

Réponse à la question d'entretien

Utilisateur anonyme

10 mars 2010

I had said the right answer intially data part of data segment but he tried arguing that it is in heap. I got confused for stack but wasnt convinced it to be stored in the heap.