consider the following C++ code:
char test='a';
test=test-32;
cout << "test: " << test << endl; //prints 'A'
test='a';
cout << "diff: " << test-32; //prints '65'
You can see that if I assign to test (my char variable) the value of test-32, it prints the Uppercase 'A' character. Instead if I just print the value of test-32, it seems to just print the difference between the ASCII code of the 'a' character and 32.
Could someone help to understand what's going on here? Maybe C++ automatically casts the ASCII code to the relative character when trying to assign it to a char variable?