$ gcc -o hw02test hw02.c hw02test.c hw02test.c: In function ‘main’: hw02test.c:5:2: warning: implicit declaration of function ‘print_integer’ [-Wimplicit-function-declaration] print_integer(1, 10, ""); -- TRANSLATION: You are missing a header file or forward declaration. GCC doesn't know what that function returns or what it is supposed to take. $ diff <(./hw02test) hw02test.txt 1d0 < 1 \ No newline at end of file -- TRANSLATION: File has a newline (\n) at the end, but program didn't output a newline the end. SOLUTION: Add fputc('\n', stdout) or printf("\n") to end of your main(); $ gcc -o hw02test hw02.c hw02test.c hw02.c: In function ‘print_integer’: hw02.c:10:2: warning: passing argument 1 of ‘fputc’ makes integer from pointer without a cast [enabled by default] fputc("1", stdout); ^ In file included from hw02.c:2:0: /usr/include/stdio.h:573:12: note: expected ‘int’ but argument is of type ‘char *’ extern int fputc (int __c, FILE *__stream); ^ -- TRANSLATION: Got a string literal (e.g., "1") where we expected a char constant ('1'). Remember that to the compiler, a char constant is the same as an int constant. SOLUTION: Check your quotes. "▒" is for a string literal. '▒' is for a char constant.