JiaHeng-DLUT
7/28/2019 - 10:23 AM

int ↔ char

#include <iostream>
using namespace std;

int main() {
	// ASCII (S: 83)
	int a = 339;
	char b = a;
	char c = (char)a;
	int d = (int)b;
	int e = a & 0xff; // oxff = 256
	cout << a << " " << b << " " << c << " " << d << " " << e << endl; // 339 S S 83 83
}