c user defined function example