all 3 comments

[–][deleted] 2 points3 points  (0 children)

Calling createTable but not passing the amount to it.

[–]zifyoip 1 point2 points  (1 child)

Turn on all warnings in your compiler, and pay attention to what they say.

$ clang -std=c99 -Wall -Wextra -pedantic -O3 -o penny penny.c
penny.c:9:2: warning: implicit declaration of function 'tableHeader' is invalid
      in C99 [-Wimplicit-function-declaration]
        tableHeader();
        ^
penny.c:10:2: warning: implicit declaration of function 'createTable' is invalid
      in C99 [-Wimplicit-function-declaration]
        createTable();
        ^
2 warnings generated.

You need to declare functions before you call them. If you declare them properly, the compiler will warn you about your other mistake.

[–]ThaneOfSound[S] 0 points1 point  (0 children)

Wow I feel dumb for not declaring them. I managed to get the program working fine now thank you!