So this is the code
void main()
{
unsigned char n,t;
scanf("%hhu %hhu",&n,&t);
printf("%hhu %hhu",n,t);
}
The problem is when I input 5 and 1 respectively, the output is 0 and 1. 0 for n and 1 for t. However, when I changed the type from char to int/unsigned, the output is right as expected: 5 and 1.
The question is why asking for (number) input with char gives invalid value?