#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
char c = 0x80;
printf("%x\n", c); //c は char型
int n = (c & 0xF0) >> 4;
std::cout << n << std::endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RkaW8uaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewoJY2hhciBjID0gMHg4MDsKCXByaW50ZigiJXhcbiIsIGMpOyAvL2Mg44GvIGNoYXLlnosKCWludCBuID0gKGMgJiAweEYwKSA+PiA0OwoJc3RkOjpjb3V0IDw8IG4gPDwgc3RkOjplbmRsOwoJcmV0dXJuIDA7Cn0=