Your program doesn't call printSum
, it just declares it. Change this line:
void printSum(void);
to
printSum();
If your functions are in the same order in your source file as you put them here, you'll also need to forward declare or move the implementation of printSum
above main
to be correct.
You should probably look into getting a beginner C book.