Let us now return to out linked list example:
We can now try to grow the list dynamically:
~link = (ELEMENT *) malloc(sizeof(ELEMENT));
This will allocate memory for a new link.
If we want to deassign memory from a pointer use the free() function:
~free(link)
See Example programs (queue.c) in Appendix and try
exercises for further practice.