Define dynamic data structures and explain their usefulness Properly use malloc and free Draw, explain, and code singly and doubly linked lists By combining the types present in C and some user defined structs, it is possible to build very complex dynamic data structures which can grow or shrink to reflect the data they model. By far the most common of these are linked lists, which come in singly and doubly linked varieties, and can be used to build stacks, queues, ring buffers, or other useful things.
Trees are another example of a dynamic data structure.
The reason that dynamic data structures are dynamic is that their elements are not declared at compile-time. Instead, they are brought into existence as the programmer needs them. This is accomplished using the standard library function malloc. You should remember from our discussion of pointers that a void pointer is a special type of pointer which can be made to point to anything. It is the programmers responsibility to cast the void pointer to a useful type, which might be any of the standard types, or it might be a programmer defined type.