Automatic generation of C programs