单项选择题
若要求从键盘读入含有窄格字符的字符串,应使用函数( )。
A) getc()
B) gets()
C) getchar()
D) scanf()
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
若变量已正确定义,下列正确的程序段是( )。
A) while(ch=getchar()=='\NN')putchar(ch);
B) while((ch=getchar())=='\n')putchar(ch);
C) while((ch=getchar())!='\N')putchar(ch);
D) while((ch=getchar())!='\n')putchar(ch);
点击查看答案&解析
单项选择题
有以下程序 #include<stdio.h> main() int x=8; for(;x>0;X--) if(x%3)printf( %d, ,x--);continue; printf( %d, ,--x); 程序的运行结果是( )。
A.7,4,2
B.8,7,5,2
C.9,7,6,4
D.8,5,4,2
点击查看答案&解析
相关试题
执行以下程序后,test.txt文件的内容是(...
有以下程序: struct Sint n;int a[...
下列叙述中错误的是()。
设有下列说明语句: Strcut Str int x...
有以下程序 #include<stdio.h> void...