What is malloc () in C?

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.

Sizin İçin Seçtik  Engel oranı nasıl yükseltebilirim?

Leave a Reply

Your email address will not be published. Required fields are marked *

What is malloc () in C?

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.

Sizin İçin Seçtik  How dynamically allocate memory for 2d array in C?

Leave a Reply

Your email address will not be published. Required fields are marked *