which are valid declarations of the char?
char c1=064770;
char c2='face';
char c3=0xbeef;
char c4=\u0022;
char c5='\uface';
cahr c6='\iface';
为什么c2有错 而c5和c6却没错呢
char c1=064770;
char c2='face';
char c3=0xbeef;
char c4=\u0022;
char c5='\uface';
cahr c6='\iface';
为什么c2有错 而c5和c6却没错呢
c5='\uface';是字符的编码表示,\u表示十六进制,后面要跟4个十六进制字符,那一个字符就是16位的了
char c2='f';
char c3=0xbeef;
char c4='\u0022';
char c5='\uface';
char c6='\uface';
这样就全部正确了
肯定2错拉