CP CVDT Q45

  • Option : D
  • Explanation : Calling free on a dynamically allocated object releases its storage. The pointer variable passed to free is not automatically assigned NULL. After the object is freed, using a pointer that refers to the released storage is invalid. Programmers commonly assign NULL to a pointer after freeing its allocation to avoid accidentally using a dangling pointer.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *