Q 11. Which of the following is used to release dynamically allocated memory in C++?
A. delete
B. free
C. malloc
D. release
Q 12. Which of the following C++ features allows you to access private members of a class from outside the class?
A. Friend function
B. Inheritance
C. Encapsulation
D. Polymorphism
Q 13. Which of the following statements about C++ destructors is correct?
A. A destructor is called explicitly by the programmer.
B. A destructor has the same name as the class but with a tilde (~) prefix.
C. A destructor can have parameters.
D. A destructor cannot be virtual.
Q 14. Which of the following is the correct way to define a function that accepts a pointer as an argument in C++?
A. void function(int *ptr);
B. void function(int ptr*);
C. void function(*int ptr);
D. void function(int& ptr);