Which function in C is used to release dynamically allocated heap memory to prevent memory leaks?
मेमोरी लीक से बचने के लिए डायनामिक रूप से आवंटित हीप मेमोरी को मुक्त करने हेतु C में किस फंक्शन का उपयोग किया जाता है?
Solution Breakdown:
-> Every `malloc()` or `calloc()` call in C should be paired with `free(ptr)` once the memory is no longer needed.
-> Hence, Option (D) is the correct answer.
-> डायनामिक मेमोरी को खाली करने के लिए `free()` फंक्शन का उपयोग किया जाता है।
-> इसलिए विकल्प (D) बिल्कुल सही है।