Explanation
In C, you should include stdlib.h. This will give you the function prototypes for the family of malloc functions (malloc, calloc, realloc, and free). Some compiler vendors provide access to these functions through other header files as well, but stdlib.h is the most portable one to use.