Answers for "c turn int to char"

C
8

turn a char into an int in c

int x = character - '0';
Posted by: Guest on November-04-2020
6

int to char in c

c = i +'0';
Posted by: Guest on October-20-2020
3

casting an int to a char in c

Use ASCII chart.
int i=65;
char ch;
ch= (char)i;
printf("Expected value of ch: A. This value is found by using a ASCII chart");
Posted by: Guest on October-15-2020
0

bcd to char c

void BCD_To_ASCII(unsigned char bcd_value, char * p_ascii_text)
{
  //--------------------------------------------------
  // BCD contains digits 0 .. 9 in the binary nibbles
  //--------------------------------------------------
  *p_ascii_text++ = (bcd_value >> 4)  + '0';
  *p_ascii_text++ = (bcd_value & 0x0f) + '0';
  *p_ascii_text = '\0';
  return;
}
Posted by: Guest on November-21-2020

Code answers related to "C"

Browse Popular Code Answers by Language