// 定义如下变量:char c =56;short num =67;int m;longlongint n;// 进行如下操作:
m =((int)c);
n =((longlong)num);// 那么它们在内存中的存储方式为:00111000//Binary of 'c'0000000001000011//Binary of 'num'00000000000000000000000000111000//Binary of 'm'0000000000000000000000000000000000000000000000000000000001000011//Binary of 'n'
存储长度较长的类型赋值给存储长度较短的类型:舍弃高位(但保留符号),截断低字节给存储长度较短的类型
unsigned类型赋值给非unsigned类型:直接传递数值
printf 输出 int 和 unsigned int 时可以混用 %d(或%i)和 %u(或%ui),但还是建议输出 int 类型的时候用 %d(或%i),输出 unsigned int 类型时用 %u(或%ui)(其它类型同理<如%ul等>)