单项选择题
下面程序的功能是将从键盘输入的两个数由小到大排序输出,当输入一对相等数时结束循环。请选择填空。
#include <stdio.h>
main()
int a,b,t;
scanf("%d%d",&a,&b);
while(______)
if(a>b) t=a;a=b;b=t;
printf("%d,%d\n",a,b);
scanf("%d%d",&a,&b);
A.! a=b
B.a! =b
C.a= =b
D.a=b
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
已知学生记录描述为: struct student int no; char name[20],sex; struct int year,month,day; birth; ; struct student s; 设变量s中的“生日”是“1984年11月12日”,对“birth”正确赋值的程序段是( )。
A.year=1984;month=11;day=12;
B.year=1984;s.month=11;s.day=12;
C.birth.year=1984;birth.month=11;birth.day=12;
D.birth.year=1984;s.birth.month=11;s.birth.day=12;
点击查看答案&解析
单项选择题
阅读下列程序,当运行程序时,输入asd af aa z67,则输出为( )。 #include <sldio.h> int fun (char *str) int i,j=0; for(i=0;str[i]! =’ 0’;i++) if(str[i]! = ) str[j++]=str[i]; str[j]=’ 0’; main() char str[81]; int n; printf( Input a string: ); gets(str); fun(str); printf( %s n ,str);
A.asdafaaz67
B.asd af aa z67
C.asd
D.z67
点击查看答案&解析
相关试题
下列程序的运行结果是( )。 #include...
若有如下语句: int x=3; do printf...
有以下程序: #include <stdio.h> v...
有如下程序: #include <stdio.h> i...
阅读下列程序,当运行程序时,输入asd af...