Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Integer to character type
Integer to character type

They are converted automatically. Because when characters are stored in memory, they are first converted into integers and then stored in binary.

As long as you use character format when outputting, it will be fine.

For example, in C:

int a = 65;

printf("%c", a);

Output result It’s A.

int a = 65;

char b;

b = a;

printf("%c", b);

The output result is also A.