Science, asked by akshayraj1282, 1 year ago

Where are the local variable stored ?
a.in a queue
b.in stack memory
c.in hard disk
d.in heap memory?

Answers

Answered by orangesquirrel
3

Answer:

The correct answer is (b) stack memory.

Local variables as well as function parameters are generally stored in stack memory.

However, sometimes they can also be placed in a data segment. This depends on the type of local variable ( static or auto). The static ones are placed in the data segment.

On the other hand, the global variables are always placed in the data segment part, and the register variables in the CPU.

Similar questions