MCQsIntermediate MCQsMemory ManagementMemory Management 1).What is dynamic memory allocation in C++?1) Allocating memory during runtime2) Allocating memory during compile time3) Using static memory4) None of the above 2).Which operator is used for dynamic memory allocation?1) new2) malloc3) allocate4) None of the above 3).Which operator is used to deallocate memory in C++?1) delete2) free3) dispose4) None of the above 4).What is a memory leak?1) Memory that is not deallocated2) Memory allocated at compile time3) Excessive memory usage4) None of the above 5).What is a smart pointer?1) A pointer that automatically manages memory2) A pointer that points to other pointers3) A pointer that only works with arrays4) None of the above 6).What does the new operator return?1) A pointer to the allocated memory2) The size of allocated memory3) The address of the deallocated memory4) None of the above 7).What is the difference between malloc and new?1) malloc is procedural, new is object-oriented2) malloc does not call constructors3) Both A and B4) None of the above 8).What happens if delete is used on NULL?1) No operation is performed2) It causes a segmentation fault3) It deallocates NULL4) None of the above 9).Which smart pointer type prevents cyclic references?1) weak_ptr2) shared_ptr3) unique_ptr4) None of the above 10).What is the purpose of the delete[] operator?1) To deallocate memory allocated for arrays2) To deallocate static memory3) To deallocate class objects4) None of the above