各位帮个忙
#include"stdio.h"int main()
{
int x=353;
char y;
y=x;
printf("%c\n",y);
return 0;
}
为什么输出a?
已经超出ASCII表格了啊
[此贴子已经被作者于2018-5-22 11:52编辑过]
#include"stdio.h" int main() { int x=353,i; char y; //y=x; for (i=0;i<100;i++) { y=x-i; printf("%c\n",y); } return 0; }
#include<stdio.h> #include<string.h> int main( void ) { const int k=0x12345678; char s; memcpy(&s,&k,sizeof (s)); printf("%#02x\n",s); return 0; }
[此贴子已经被作者于2018-5-22 12:01编辑过]