added new file function.c

new file with a function