Tuesday, November 11, 2014

4.1.7 DYNAMIC ARRAYS

NOTE: the process of allocating memory at compile time is known as static memory allocation and the arrays that receive static memory allocation are called static arrays.

 

In C, it is possible to allocate memory to arrays at run time. This feature is known as dynamic memory allocation and the arrays created at run time are called dynamic arrays.

 

Dynamic arrays are created using pointer variables and memory management functions like malloc(), calloc(), realloc(). These functions are included in the header file <stdlib.h>. The concept of dynamic arrays is used in creating and manipulating data structures as linked lists, stacks and queues.

 

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.