Frage im Vorstellungsgespräch bei Brocade

Find if the program is moving up or down the stack, write the code.

Antwort im Vorstellungsgespräch

Anonym

16. Apr. 2015

void findStackupDown(int *ptr) { int val; if (&val > ptr) printf("stack is moving down"); else printf("stack is moving up"); } main() { int a; findStackupDown(&a); }