更多“有以下程序 #include <stdio.h> main() { int y=9; for(; y>0; y--) if(y%”相关的问题
第1题
#include<stdio.h> main() { int n=32761,d; while(n!=0) { d=n%10; printf("%d,",d); n/=10; } } 程序的运行结果为 __ _。
点击查看答案
第2题
有以下程序#include<stdio.h>main( ){int y=10while(y--);printf(“y=%d\n”,y);}程序执行后
有以下程序
#include<stdio.h>
main( )
{int y=10
while(y--);
printf(“y=%d\n”,y);
}
程序执行后的输出结果是( )。
A.y=0
B.y=-1
C.y=1
D.while构成无限循环
点击查看答案
第3题
下面的程序运行后,输出的结果是( )。 #include "stdio.h" main( ) { int x=3; do { printf ("%d", x-=2); } while (!(--x)); }
点击查看答案
第4题
若x是int型变量,则执行以下语句的结果是( )。 for(x=1; ;x++) if(x%2==0) if(x%3==0) if(x%5==0) { printf("%d",x); break; }
A、30
B、30 60 90
C、不输出任何内容
D、死循环
点击查看答案
第5题
以下程序的功能是:输入一个小写字母,将字母循环后移5个位置后输出。例如‘a’变成‘f’,‘w’变成‘b’。请将填空【1】补充完整。说明:写出最简洁的形式,不要任何空格,语句后的分号已经给出,填空时不要再重复写。 #include"stdio.h" int main() { char c; c=getchar( ); if(c>='a'&& c<='u') c+="5;" else if(c>='v'&&c<='z') __【1】__; 注意:语句后的分号已经给出,填空时不要再重复写 putchar(c); return 0; }>
点击查看答案
第6题
在表达式s=10中,其中“=”为( )运算符。
点击查看答案
第7题
设变量的定义如下: char a; int b; float c,d;则表达式a*b+c/d 值的类型为 ( )(写关键字,不写汉字)。
点击查看答案
第8题
表达式3.5+1/2计算结果是( )(保留一位小数)。
点击查看答案
第9题
以下程序段的输出结果是 ( )。 char a='B'; int i=20; printf("%c-%d",++a,i++);
A、B-20
B、C-20
C、67-20
D、B-21
点击查看答案