Question: Where is Memory Allocated During Dynamic Memory Allocation in C Programming
Answer: Dynamic memory allocation in which memory is more explicitly (but more flexibly) managed, typically, by allocating it from the free store (informally called the “heap”), an area of memory structured for this purpose. 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. Dynamic memory allocation is a manual memory management technique.
Sanfoundry Global Education & Learning Series – 1000 C Tutorials.
If you wish to look at all C Tutorials, go to C Tutorials.
Next Steps:
- Get Free Certificate of Merit in C Programming
- Participate in C Programming Certification Contest
- Become a Top Ranker in C Programming
- Take C Programming Tests
- Chapterwise Practice Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- Chapterwise Mock Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
Related Posts:
- Apply for C Internship
- Practice Computer Science MCQs
- Apply for Computer Science Internship
- Buy C Books
- Buy Computer Science Books