The malloc() is a function that a allocating the memory
space. The malloc() stands for memory allocator. It allocates memory space of
specified size and returns a pointer.
The pointer return by the malloc()
function is void pointer.
Sy:
pointer = (data_type *) malloc( sizeof( data_type));
ex:
ptr = (int *)malloc( sizeof(int));
No comments:
Post a Comment