What is dynamic memory allocation Explain in brief - counter
Sponsored Links

Popular Links

List of Abbreviations

National Highways in India

States & Union Territories of India

Currency of All Countries

What is dynamic memory allocation Explain in brief

You are Here: Home > Computer Subjects > Programming in C Language > …

What is dynamic memory allocation Explain in brief.

Ans. In computer science, dynamic memory allocation is the process of allocating the memory of computer storage during the run-time of that program. It is also known as heap-based memory allocation.

To allocate memory we must have a pointer so we can know where the memory will be at when it gets allocated. See the code example:

char *str = (char *)malloc(40); // allocate memory for a 40 character string

Heap memory is allocated in a more complex way than stack memory.
Like stack-allocated memory, the underlying system determines where to get more memory – the programmer doesn’t have to search for free memory space.


Click Here to Find Latest Jobs and Current Affairs

Updated: May 31, 2013 — 2:19 pm

Leave a Reply

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

© 2018. All Rights Reserved. www.WikiIND.com