【单选题】#includeintmain(){inta[3][3],*p,i;p=&a[0][0];for(i=0;i<9;i++){p[i]=i+1;}printf("%d
",a[1][2]);return0;}
A. 6
B. 3
C. 9
D. 2
",a[1][2]);return0;}
A. 6
B. 3
C. 9
D. 2
举一反三
- 以下程序运行后的输出结果是#include<stdio.h>intmain(){inta[3][3],*p,i;p=&a[0][0];for(i=0;i<9;i++){p[i]=i+1;}printf("%d\n",a[1][2]);return0;}? 9|3|2|6
- 运行以下程序时,输出结果是______。#include<stdio.h>intf(inta){intb=0;staticintc=2;b++;c+=3;return(a+b+c);}intmain(){inta=1,i;for(i=0;i<=2;i++)printf("%4d",f(a));}
- 以下程序的输出结果是 main() { int i, k, a[10], p[3]; k=5; for (i=0;i<10;i++) a[i ]=i; for (i=0;i<3;i++) p[i ]=a[i *(i+1)]; for (i=0;i<3;i++) k+=p[i] *2; printf("%d\n",k); }
- 【单选题】下面程序执行后的输出结果是()。#include <stdio.h>int main(){int i=0,s=0;for (;;) {if(i==3||i==5) continue;if (i==6) break;i++; s+=i;};printf("%d",s); return 0;}#include <stdio.h>int main(){int i=0,s=0;for (;;) {if(i==3||i==5) continue;if (i==6) break;i++; s+=i;};printf("%d",s); return 0;}#include <stdio.h>int main(){int i=0,s=0;for (;;) {if(i==3||i==5) continue;if (i==6) break;i++; s+=i;};printf("%d",s); return 0;}#include <stdio.h>int main(){int i=0,s=0; A. 10 B. 13 C. 21 D. 死循环
- 【单选题】以下程序的输出结果是()#include<stdio.h>intmain(void){inti;for(i=1;i<=10;i++){if(i%3==0)continue;if(i%7==0)break;printf(“%d”,i);}return0;} A. 12345678910 B. 1245 C. 12456 D. 12457810