Answer the question
In order to leave comments, you need to log in
How to convert from int to char in SI?
Good afternoon. I want to display a number in putchar, but putchar only outputs string variables. How can I stringify my numeric variable?
Answer the question
In order to leave comments, you need to log in
To directly answer the question, then assuming that you only confused characters and strings, like this
int i=5;
putchar ('0'+i);
putchar writes only 1 character to the output stream.
Probably what you really need is this:printf("%d\n", i);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question