Memory Management Techniques (Static, Stack, and Heap) MCQs

30 min Score: 0 Attempted: 0/30 Subscribe
1. Which memory allocation occurs at compile time?





2. Which memory region stores local variables of a function?





3. Which memory allocation allows variable size at runtime?





4. Memory allocated on the heap must be:





5. Which memory region persists for the lifetime of the program?





6. Which memory management technique follows Last-In-First-Out (LIFO)?





7. Which of the following is an advantage of heap memory?





8. Which memory allocation is typically used for global variables?





9. What happens when stack memory overflows?





10. Which memory management technique is used in recursion?





11. Dynamic memory allocation is usually done in which region?





12. Which of the following is true for static memory?





13. Stack memory is automatically freed when:





14. Which memory type can cause fragmentation if not managed carefully?





15. Which memory region is generally faster to access?





16. Which allocation is suitable for temporary data?





17. Which memory allocation allows sharing of variables across functions?





18. What is a major disadvantage of heap allocation?





19. Which memory is used for constant values?





20. Which memory type grows downward in most systems?





21. Which of the following is true for heap memory allocation?





22. What is memory leak?





23. Which memory type is most suitable for large arrays created at runtime?





24. Which memory allocation method is safe from memory leaks if used properly?





25. Which memory is initialized only once before the program starts?





26. Which memory management technique is best for recursive function calls?





27. Which allocation type requires programmer intervention to free memory?





28. Which memory type may lead to stack overflow in case of deep recursion?





29. What is the main advantage of static allocation?





30. Which memory type is generally used for objects whose lifetime extends beyond the scope of a function?





Leave a Comment

All copyrights Reserved by MCQsAnswers.com - Powered By T4Tutorials