Difference between static memory allocation and dynamic memory allocation
Answers
Answered by
6
Answer:
Difference between static memory allocation and dynamic memory allocation
Explanation:
Static Memory Allocation:-
- The variable was declared permanently when it will be picked.
- Before the execution of the program allocation will be done.
- It was used in the stack.
- This allocation is not so much reliable.
- No memory will be reused again.
Dynamic Memory Allocation:-
- The variable was declared temporarily when it will be picked again and again.
- After the execution of the program allocation will be done.
- It was used in heap.
- This allocation is reliable.
- The memory will be reused again and again.
Similar questions