Computer Science, asked by nehabittu2107, 9 months ago

explain malloc function with detail​

Answers

Answered by meghanabhuvana
1

Answer:

In C, the library function malloc is used to allocate a block of memory on the heap. The program accesses this block of memory via a pointer that malloc returns. When the memory is no longer needed, the pointer is passed to free which deallocates the memory so that it can be used for other purposes.

Explanation:

Hope it helps you

Please mark me as brainliest

Answered by sushantdeshmukh07
0

Answer:

In C, the library function malloc is used to allocate a block of memory on the heap. The program accesses this block of memory via a pointer that malloc returns. When the memory is no longer needed, the pointer is passed to free which deallocates the memory so that it can be used for other purposes.

Similar questions