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
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
Social Sciences,
8 months ago
Math,
8 months ago
Math,
8 months ago
Political Science,
1 year ago
English,
1 year ago
Hindi,
1 year ago