c语言汉字输入与输出,在C语言汉字的输入输出问题

1,在C语言汉字的输入输出问题举个例子吧:#include #include #define sz 300 int main() { char st[sz]; //定义一个字符数组用来存取 printf ("please input"); scanf("%s",st); //将取得的字符放入st数组 printf("%s\n",st); system ("pause"); return 0; }
2,C言中怎么输入输出汉字#include #include int main(){ char S[2]; int a,b; while(1) { printf("请输入一个汉字:"); scanf("%s",S); a=(unsigned char)S[0],b=(unsigned char)S[1]; printf("%d %d\n",a,b); printf("%c%c\n",a,b); printf("%s\n",S); } return 0;}是不是要在dos中装个输入法呢?你的程序是死循环 死循环是给你 无限次测试的 别当别人是傻子 #include main(){ char s[2]; printf("请输入一个汉字:"); scanf("%s",s);//按下Ctrl+空格后再输入汉字 printf("%s",s);}回复 5楼 lii_yong你 什么都不知道 懒得跟你说 【c语言汉字输入与输出,在C语言汉字的输入输出问题】

    推荐阅读