You haven't declared f1 () and f2 () BEFORE you use them. C will therefore presume that they accept an int and return an int. When you call them, you call them as accepting a void and returning a void. Either put the definitions ABOVE main, or put a declaration (prototype) above main.