How to convert integer to char in C?

A char in C is already a number (the character’s ASCII code), no conversion required.

If you want to convert a digit to the corresponding character, you can simply add ‘0’:

c = i +'0';

The ‘0’ is a character in the ASCll table.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)