Function generator for c programs