Where will the space be allocated for an automatic storage class variable?
Answer: C
Correct answer: In memory
An automatic variable lives on the stack, which is memory. The register class is the one that asks for a CPU register, and even that is only a request. A compiler may of course keep an automatic variable in a register as an optimisation, but the storage class itself specifies memory.
Please log in or register to report this question.