new c sample code