第1题:
有下列程序: #include <stdio.h> main() { int s[12]={1,2,3,4,4,3,2,1,1,1,2,3},c[5]={0},i; for(i=0;i<12;i++)c[s[i]]++; for(i=1;i<5;i++)printf("%d",c[i]); printf("\n"); 程序的运行结果是( )。
A.1 2 3 4
B.2 3 4 4
C.4 3 3 2
D.1 1 2 3
第2题:
A.6
B.5
C.4
D.3
第3题:
publicclassThreads1{intx=0;publicclassRunnerimplementsRunnable{publicvoidrun(){intcurrent=0;for(int=i=0;i<4;i++){current=x;System.out.print(current+,);x=current+2;}}}publicstaticvoidmain(String[]args){newThreads1().go();}publicvoidgo(){Runnabler1=newRunner();newThread(r1).start();newThread(r1).start();}}Whichtwoarepossibleresults?()
A.0,2,4,4,6,8,10,6,
B.0,2,4,6,8,10,2,4,
C.0,2,4,6,8,10,12,14,
D.0,0,2,2,4,4,6,6,8,8,10,10,12,12,14,14,
E.0,2,4,6,8,10,12,14,0,2,4,6,8,10,12,14,
第4题:
下面程序的执行结果是______。 #define MAX 10 nt a[MAX],i; main() { printf("\n"); sub1();sub3(A) ; sub2();sub3(A) ; } sub1() {for(i=0;i<1MAX;i++) a[i]-i+i; } sub2() {int a[MAX],i,max; max=5; for(i=0;i<max;i++) a[i]=i; } sub3(int a[]) { int i; for(i=0;i<MAX;i++) printf("%d",a[i]); printf("\n"); }
A.0 2 4 6 8 10 12 14 16 18 0 1 2 3 4
B.0 1 2 3 4 0 2 4 6 8 10 12 14 16 18
C.0 1 2 3 4 5 6 7 8 9 0 1 2 3 4
D.0 2 4 6 8 10 12 14 16 18 0 2 4 6 8 10 12 14 16 18
第5题:
有以下程序的输出结果是 int f(int b[ ][4]) { int i,j,s=0; for(j=0;j<4;j++) { i=j; if(i>2) i=3-j; s+=b[i][j]; } return s; } main( ) { int a[4][4]={{1,2,3,4},{0,2,4,5},{3,6,9,12},{3,2,1,0}}; printf(“%d\n”,f(a)); }
A.12
B.11
C.18
D.16
第6题:
0 , 1 , 1 , 2 , 4 , 8 , ( )
A . 16
B . 8
C . 6
D . 12
第7题:
0, 1, 1, 2, 4, 8, ( )
A.16
B.8
C.6
D.12
第8题:
第9题:
第10题:
表达式 (4 >> 2) - !-1 + 4 & 6 ^ 2 << 1的值是()
第11题:
假设在跳频集中有12个频率(f1-f12),在小区中分配给前7个TRX的缺省MAIO值是多少()。
第12题:
public class Threads 1 { intx=0; public class Runner implements Runnable { public void run() { int current = 0; for(int=i=0;i<4;i++){ current = x; System.out.print(current + “, “); x = current + 2; } } } public static void main(String[] args) { new Threads1().go(); } public void go() { Runnable r1 = new Runner(); new Thread(r1).start(); new Thread(r1 ).start(); } } Which two are possible results?()
第13题:
3,4,4,8,( ),12,24,27 A.0 B.1 C.2 D.
第14题:
A.0,2,4,4,6,8,10,6
B.0,2,4,6,8,10,2,4
C.0,2,4,6,8,10,12,14
D.0,0,2,2,4,4,6,6,8,8,10,10,12,12,14,14
E.0,2,4,6,8,10,12,14,0,2,4,6,8,10,12,14
第15题:
以下程序的运行结果是( ) #define MAX 10 int a[MAX],i; main() { printf("\n");sub1();sub3(A) ,sub2(),sub3(A) ; } sub2() { int a[MAX],i,max; max=5; for(i=0;i<max;i++)a[i]=i; } sub1() {for(i=0;i<MAX;i++)a[i]=i+i; } sub3(int a[]) { int i; for(i=0;i<MAX,i++)printf("%d",a[i]); printf("\n"); }
A.0 2 4 6 8 10 12 14 16 18 0 1 2 3 4
B.0 1 2 3 4 0 2 4 6 8 10 12 14 16 18
C.0 1 2 3 4 5 6 7 8 9 0 1 2 3 4
D.0 2 4 6 8 10 12 14 16 18 0 2 4 6 8 10 12 14 16 18
第16题:
有以下程序: #include <stdio.h> int f(int b[] [4]) { int i,j,s=0; for(j=0;j<4;j++) { i=j; if(i>2) i=3-j; s+=b[i][j]; } return s; } main() { int a[4][4]={{1,2,3,4},{0,2,4,6},{3,6,9,12},{3,2,1,0}}; printf("%d\n",f(a)); } 执行后的输出结果是( )。
A.12
B.11
C.18
D.16
第17题:
若定义static int a[2][2]={1,2,3,4},则a数组的各数组元素分别为______。
A.a[0][0]=1、a[0][1]=2、at[1][0]=3、a[1][1]=4
B.a[0][0]=1、a[0][1]=3、a[1][0]=2、a[1][1]=4
C.a[0][0]=4、a[0][1]=3、a[1][0]=2、s[1][1]=1
D.a[0][0]=4、a[0][1]=2、a[1][0]=3、a[1][1]=1
第18题:
有以下程序 #include <stdio.h> main() { int s[12]={1,2,3,4,4,3,2,1,1,1,2,3},c[5]={0},i; for(i=0;i<12;i++) c[s[i]++; for(i=l;i<5;i++) printf("%d",c[i]); printf("\n"); } 程序的运行结果是
A.1 2 3 4
B.2 3 44
C.4 3 3 2
D.1 1 2 3
第19题:
-1,2,0,4,4,12,( ) A.4 B.8 C.12 D.20
第20题:
第21题:
第22题:
分量视频的采样有如下四种结构()
第23题:
若有以下说明,int?a[12]={1,2,3,4,5,6,7,8,9,10,11,12};?则数值为4的表达式是()
第24题:
0, 2, 4, 4, 6, 8, 10, 6,
0, 2, 4, 6, 8, 10, 2, 4,
0, 2, 4, 6, 8, 10, 12, 14,
0, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14,
0, 2, 4, 6, 8, 10, 12, 14, 0, 2, 4, 6, 8, 10, 12, 14,