C in four functions