【发布时间】:2010-10-26 12:29:44
【问题描述】:
我在使用这个 c 语言代码时遇到了问题:
char st[2];
printf("enter first value:");
scanf("%c", &st[0]);
printf("enter second value:");
scanf("%c", &st[1]);
所以我的电脑没有要求我输入第二个值,我的意思是说它只打印第一个printf 语句然后我输入一个字符然后它只打印第二个printf 语句和程序结束不接受第二个输入。
请帮忙。这段代码有什么问题?
-提前致谢。
【问题讨论】:
-
今天一定是
scanf问题的日子。 Same problem as this,我想。 []()
标签: c