









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










We can also use at place of header file
Note โ Since malloc, calloc and realloc functions return a void pointer, the returned pointer must be type casted to the appropriate type before use. โ The lifetime of dynamically allocated objects extends from the time of their allocation until deallocation. The deallocation is automatically done with the termination of a program or can be done by giving a call to the function free.
Example 4 - A program that suffers from memory leak