top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How many Library functions are there to allocating the memory dynamically in C?

0 votes
349 views
How many Library functions are there to allocating the memory dynamically in C?
posted Mar 10, 2016 by Ramya

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

There are four library functions in C for dynamic memory allocation and these are as follows -

malloc() - Allocates requested size of bytes and returns a pointer first byte of allocated space.
calloc() - Allocates space for an array elements, initializes to zero and then returns a pointer to memory.
free() - dellocate the previously allocated space.
realloc() - Change the size of previously allocated space.

answer Mar 10, 2016 by Ashish Kumar Khanna
Similar Questions
+1 vote

Does there exist any way to make the command line arguments available to other functions without passing them as arguments to the function in C programming?

+2 votes

What is the optimize way to allocate memory to 2D array dynamically ??

...