8-10以下程序的输出结果是________。main(){int i, x[9]={9,8,7,6,5,4,3,2,1};for(i=0; i<4; i+=2)printf("%d ", x[i]);}
A. 5 2
B. 5 1
C. 5 3
D. 9 7
8-11以下程序输出的结果是________。#include main( ){int a[ ]={1,2,3,4,5}, i, j, s=0;j=1;for(i=4; i>=0; i--){s=s+a[i]*j;j=j*10;}printf("s=%d\n",s);}
A. s=12345
B. s=1 2 3 4 5
C. s=54321
D. s=5 4 3 2 1
8-12以下程序运行,如果从键盘上输入 4<回车>,则输出结果是________ 。#include <>main( ){int a[20]={1,2,3,4,5,-1,-2,-3,-4,-5,1,2,3,4,5,-1,-2,-3,-4,-5};int i, m, n, f=0;scanf("%d", &n);for(i=0;i<20;i++)if(a[i]==n){f=1;m=i;}if(f!=0)printf("%d,%d\n", n, m+1);elseprintf(" %d not found !\n",n);}
A. 4,4
B. 4,14
C. 4,5
D. 4,15