📜  malloc在-C编程语言代码示例中有什么用

📅  最后修改于: 2022-03-11 15:04:43.461000             🧑  作者: Mango

代码示例1
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.