Updated old code so that it compiles with my newer gcc. Don't need to declare malloc in functions and included stdlib.h.
Added .gitignore to ignore output file.