malloc returns a void pointer to the allocated space, or NULL if there is insufficient memory available . To return a pointer to a type other than void , use a type cast on the return value.
What does malloc () return?
malloc returns a void pointer to the allocated space, or NULL if there is insufficient memory available . To return a pointer to a type other than void , use a type cast on the return value.