141k views
1 vote
How can I print an int as a char in C?

2 Answers

0 votes
Use a char format specifier instead of an integer format specifier. C will automatically print the integer as a character, e.g. 97 will print as 'a'.
User Clarus Dignus
by
8.5k points
3 votes
Convert it to a char and print it
User Peng
by
7.9k points