没有搜到到结果?点击这里求解答/求资源。
【单选题】
有以下程序程序执行后输出结果( ) #include int fun(int x [ ],int n) { static int sum=0,i; for(i=0; i{ sum+=x[i]; } return sum; } void main( ) { int a[ ]={1,2,3,4,5}; int b[ ]={6,7,8,9},s=0; s=fun(a,5)+fun(b,4); printf(%d\n,s); }

45
50
60
66
【单选题】
执行下面程序后,运行结果 #includevoid main( ) { int x=41,y=1; if (x%3==0 x%7==0) { y+=x;printf(y=%d\n} else {y=x;printf(y=%d} }

y=41
y=43
y=42
y=1
【单选题】
以下程序运行后s()。 int a[3][3]={1, 2, 3, 4, 5, 1, 2, 3, 4} ; int i, j, s=1; for(i=0; i for(j=i+1; j s+=a[i][j];

6
120
7
240
【单选题】
以下程序输出结果_______? f(int b[],int m,int n) { int i,s=0; for(i=m;in;i=i+2) s=s+b[i]; return s; } int main() { int x,a[]={1,2,3,4,5,6,7,8,9}; x=f(a,3,7); printf(%d\n,x); }

7
8
9
10
【单选题】
下述程序运行结果( )。 #includevoid main() { int x=1,a=0,b=0; switch(x) { case 0:b++; case 1:a++; case 2:a++;b++; } printf(a=%d,b=%d\n,a,b); }

a=2,b=1
a=1,b=2
a=0,b=1
a=1,b=0
【单选题】
执行下面程序后,输出字符B个数(   )x=0;while(x=5){printf("B");x+=2;}

0
3个
5个
6个
【简答题】
以下程序输出结果[填空1]。#include stdio.hvoid main(){ int x, i;for(i=1; i i++){ x=i;if(++x%2==0)if(++x%3==0)if(++x%7==0)printf(%d\n,x);}printf(“\n”);}

【简答题】
以下程序输出结果[填空1]。#include stdio.hvoid main(){ int x, i;for(i=1; i i++){ x=i;if(++x%2==0)if(++x%3==0)if(++x%7==0)printf(%d\n,x);}printf(“\n”);}

【简答题】
以下程序输出结果[填空1]。#include stdio.hvoid main(){int x, i;for(i=1; i i++){ x=i;if(++x%2==0)if(++x%3==0)if(++x%7==0)printf(%d\n,x);}printf(“\n”);}

【单选题】
运行下面程序时,会产生什么异常?( ) public class X7_1_4 { public static void main(String[] args) { int x = 0; int y = 5/x; int[] z = { 1,2,3,4 } ; int p = z[4]; } }

ArithmeticException
NumberFormatException
ArrayIndexOutOfBoundsException
IOException