The content of the newly allocated block of memory is not initialized, remaining with indeterminate values.
- Size of the memory block, in bytes.
Return ValueOn success, a pointer to the memory block allocated by the function.
The type of this pointer is always void*, which can be cast to the desired type of data pointer in order to be dereferenceable.
If the function failed to allocate the requested block of memory, a null pointer is returned.
This program generates a string of the length specified by the user and fills it with alphabetic characters. The possible length of this string is only limited by the amount of memory available in the system that malloc can allocate.
|free||Deallocate space in memory (function)|
|calloc||Allocate space for array in memory (function)|
|realloc||Reallocate memory block (function)|