Machine-translated by Google. Questions are authored in English.
Top

Discussion

Automatic variables are stored in:

  • A.stack
  • B.data segment
  • C.register
  • D.heap

Answer: A

Correct answer: stack

Automatic variables are allocated on the stack: space is reserved when the block is entered and released when it is left, which is what makes their lifetime match the block and what makes recursion possible - each call gets its own frame.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.