NSCT – Memory Management Concepts MCQs 20 min Score: 0 Attempted: 0/20 Subscribe 1. What is memory management in programming? (A) A method to define classes (B) A type of loop (C) A function to print output (D) The process of storing and retrieving data efficientlyShow All AnswersShow All Answers 2. Which type of memory is used for temporary storage while a program runs? (A) ROM (B) RAM (C) Hard Disk (D) CacheShow All Answers 3. Which type of memory is non-volatile and used to store permanent data? (A) RAM (B) Stack (C) Cache (D) ROMShow All Answers 4. What is a stack in memory management? (A) A memory structure that stores data in last-in, first-out order (B) A memory structure that stores data in first-in, first-out order (C) Permanent storage (D) Temporary filesShow All Answers 5. What is a heap in memory management? (A) Memory for storing loops (B) Memory for storing constants (C) A memory area for dynamic allocation during program execution (D) Temporary disk storageShow All Answers 6. What is dynamic memory allocation? (A) Allocating memory at compile time (B) Allocating memory at runtime (C) Allocating memory on disk (D) Allocating memory in ROMShow All Answers 7. What is static memory allocation? (A) Memory allocated during program execution (B) Memory allocated at compile time (C) Memory allocated dynamically (D) Memory allocated on heapShow All Answers 8. What is memory leak? (A) Memory that is no longer used but not released (B) Memory used efficiently (C) Memory that is cleared automatically (D) Memory for loopsShow All Answers 9. Which of the following helps in automatic memory management? (A) Loops (B) Arrays (C) Functions (D) Garbage collectionShow All Answers 10. Which memory area stores global and static variables? (A) Heap (B) Stack (C) Cache (D) Data segmentShow All Answers 11. Which memory area stores local variables and function call information? (A) Heap (B) Data segment (C) Stack (D) ROMShow All Answers 12. Which memory area is used for dynamic objects? (A) ROM (B) Stack (C) Heap (D) CacheShow All Answers 13. What is pointer in memory management? (A) A data type (B) A function (C) A loop counter (D) A variable that stores memory address of another variableShow All Answers 14. Which of the following can prevent memory leaks in languages like Python and Java? (A) Static allocation (B) Garbage collection (C) Loops (D) Conditional statementsShow All Answers 15. What is virtual memory? (A) A memory management technique that uses disk space as additional memory (B) Temporary memory only (C) Memory for functions (D) Memory in CPU registersShow All Answers 16. What is the difference between stack and heap memory? (A) Stack is slow, heap is fast (B) Stack is for temporary data, heap is for dynamic allocation (C) Stack stores constants, heap stores variables (D) There is no differenceShow All Answers 17. What is memory fragmentation? (A) Allocating memory in heap (B) Combining memory efficiently (C) Splitting of memory into small unused blocks (D) Allocating memory in stackShow All Answers 18. Which of the following is an advantage of using stack memory? (A) Prevents memory leaks automatically (B) Can store large dynamic objects (C) Fast allocation and deallocation (D) Non-volatile storageShow All Answers 19. Which of the following is an advantage of using heap memory? (A) Fast allocation and deallocation (B) Can store large dynamic objects (C) Always automatic cleanup (D) Stores only local variablesShow All Answers 20. What is the main goal of memory management in programming? (A) Printing output (B) Creating loops (C) Storing functions (D) Efficient use of memory and prevention of errorsShow All Answers