/******************************************
compiler: DEV C++
system: WIN XP
test time:2004-12-5 10:55
******************************************/
#include <stdio.h>
unsigned char mychar;
int main( void )
{
/* Print extended ASCII characters 180 through 203 */
for (mychar = 180; mychar < 204; mychar++)
{
printf("ASCII code %d is character %c\n", mychar, mychar);
}
system("pause");
return 0;
}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
上面的程序输出结果为:
ASCII code 180 is character ?
ASCII code 181 is character ?
ASCII code 182 is character ?
ASCII code 183 is character ?
......
为什么本应输出对应字符的地方全是问号啊?
PS:上午我的电脑出问题了,输不了汉字,就直接在你的帖子<标准C中各种类型数值范围> 你问了一下,请原谅,呵呵~!~!
compiler: DEV C++
system: WIN XP
test time:2004-12-5 10:55
******************************************/
#include <stdio.h>
unsigned char mychar;
int main( void )
{
/* Print extended ASCII characters 180 through 203 */
for (mychar = 180; mychar < 204; mychar++)
{
printf("ASCII code %d is character %c\n", mychar, mychar);
}
system("pause");
return 0;
}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
上面的程序输出结果为:
ASCII code 180 is character ?
ASCII code 181 is character ?
ASCII code 182 is character ?
ASCII code 183 is character ?
......
为什么本应输出对应字符的地方全是问号啊?
PS:上午我的电脑出问题了,输不了汉字,就直接在你的帖子<标准C中各种类型数值范围> 你问了一下,请原谅,呵呵~!~!