top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Haw many of you understand dynamic allocation of memory, can someone explain this in detail?

0 votes
272 views
Haw many of you understand dynamic allocation of memory, can someone explain this in detail?
posted Apr 19, 2017 by Leon Martinović

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Dynamic allocation of memory means "Memory allocated during the run time based on need". There are multiple APIs supported in C library. Using those APIs (malloc and calloc) memory can be allocated during the execution of process. Best use case is linked list data structure. Dealing with linked list you don't know how many nodes it would have in advance that's why memory for nodes are allocated whenever it needs.
Hope my explanation on dynamic memory would help somewhat.

answer Apr 20, 2017 by Harshita
...