Using ‘printf’ on a variable in C [closed]

Your printf needs a format string:

printf("%d\n", x);

This reference page gives details on how to use printf and related functions.

Leave a Comment