C dynamic memory allocation and free

T.Rex
Apr 12, 2021

malloc(int numberOfBytes)

malloc() takes in number of bytes as parameter, returns the pointer to the requested memory requested or NULL if not enough space availble.

sizeof(type)

sizeof() takes in type as parameter, returns the number of bytes requried for a particular type

Requesting memory of an integer array of size N

Requesting memory of an integer array of size N can there be expresses as

--

--

T.Rex
0 Followers

Nothing has been written about T.Rex