Telecommunications Question:
Memory allocation of variables declared in a program is?
a) allocated in RAM.
b) allocated in ROM.
c) allocated on stack.
d) assigned to registers.

Answers:
Answer #1
a)allocated in RAM.
stack memory is used at the time of dynamic memory allocation
ex:- malloc();
a)allocated in RAM.
stack memory is used at the time of dynamic memory allocation
ex:- malloc();
Answer #2
Dynamic memory allocation is carried out in the heap, which is RAM. Static memory allocation is carried out in the stack.
Dynamic memory allocation is carried out in the heap, which is RAM. Static memory allocation is carried out in the stack.