"a" is a string literal which degenerates into a pointer-to-const-char. You are not subtracting 32 from the character 'a'. You are subtracting 32 from the address where the nul-terminated string "a" is stored.
cout << (char)('a' - 32) << '\n' ;
Single and double quotes mean different things in C++.