change null to NULL, rename C var to differentiate from C in main, and remove unused int
don't need errno.h include