Thought I'd also have a go at translating ch-1a.pl and ch-2.pl into C.. Both C versions produce identical (non-debugging) output to my Perl originals