To ensure memory is not used uninitialized, compile with
gcc -O -Wall or run the program under valgrind. The
-O is necessary to catch uninitialized
To catch errors of the form
if (c = 1), compile with gcc
To prevent using freed memory, set pointers to zero after "free".