output to c.txt as specified in the spec