更多“下面程序执行后,s的值是()。 int i=0,s=0; f…”相关的问题
第1题
若int i=1;执行下面程序段后,变量i的值是()。 switch (i) { case '1': case '2': case '3': default : i+=1 ;break; }
点击查看答案
第2题
阅读下面程序,则执行后输出的结果是()。 #include <stdio.h> fun(int a,int b) { int s; s=a*b/2; printf("%dn",s); } main() { int a=10; int b=16; fun(a,b); }
点击查看答案
第3题
变量是在程序执行期间其值可以改变的量,必须先定义后使用。
点击查看答案
第4题
下面代码的执行后x值是() x = 2 x *= 3 + 5**2
点击查看答案
第5题
若a=1,b=3,c=5,d=4,则执行下面程序段后x的值是()。 if (a<b) if (c<d) x=1 ; else if (a<c) if (b<d) x=2 ; else x=3 ; else x=6 ; else x=7 ;
点击查看答案
第6题
执行以下程序段后,x的值为0,y的值为1。 int x, y; if (x = 0) y = 0; else y = 1;
点击查看答案
第7题
已知字母A的ASCII码为65,且变量S为字符型,则执行语句S='A'+'6'-'3';后,S中的值为()。
点击查看答案
第8题
若s是int型变量,且s=6,则下面表达式的值是()。 s%2+(s+1)%2
点击查看答案
第9题
当执行下面程序且输入"ABC"时,则输出的结果是()。 #include <stdio.h> #include <string.h> main() { char a[10]="12345"; strcat(a,"6789"); gets(a); printf("%s",a); }
A.ABC
B.ABC9
C.123456ABC
D.ABC456789
点击查看答案
第10题
执行以下程序后k的值是()int i,j=10,k=0; for(i=0;i<=j;i++) { k=i+j; j--; }
点击查看答案