@kevin001 If you want to convert the char to int and a character '1' provides a ascii number that's not 1, you need to remove the offset '0' to realign it to count from 0-9.
This question already has answers here: Converting int to char in C (7 answers).
Casting int to char involves losing data and the compiler will probably warn you. Extracting a particular byte from an int sounds more reasonable and can be done like this
Blu-ray version english sub 16G size , best quality ! 逆襲のシャア 逆袭的夏亚 逆襲的夏亞...
What is the difference between char a[ ] and char *a[ ] in C Programming with examples?
I want to convert unsigned char* to char*, print the value and again convert char* to unsigned char*. How can I do that ?
Здравствуйте друзья! Есть код который преобразовывает int в char:unsigned char a[4]; int b = 124551
Перевожу char в int, но на выходе неверное число, вот упрощений вариант
atoi() - это круть, но просит на вход const char*, а я могу максимум char сделать( Где здесь копать? Хотя тут char используют...