网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

有以下程序

void f(int *q)

{ int i=0;

for(;i<5;i++) (*q)++;

}

main( )

{ int a[5]={1,2,3,4,5},i;

f(a);

for(i=0;i<5;i++) printf("%d,",a[i]);

}

程序运行后的输出结果是

A.2,2,3,4,5,

B.6,2,3,4,5,

C.1,2,3,4,5,

D.2,3,4,5,6,


参考答案

更多 “ 有以下程序void f(int *q){ int i=0;for(;i5;i++) (*q)++;}main( ){ int a[5]={1,2,3,4,5},i;f(a);for(i=0;i<5;i++) printf("%d,",a[i]);}程序运行后的输出结果是A.2,2,3,4,5,B.6,2,3,4,5,C.1,2,3,4,5,D.2,3,4,5,6, ” 相关考题
考题 有以下程序void f(int *q){ int i=0;for( ; i5;i++)(*q)++;}main( ){ int a[5]={1,2,3,4,5},i;f(a);for(i=0;i5;i++)printf("%d,",a[i]);}程序运行后的输出结果是A)2,2,3,4,5,B)6,2,3,4,5,C)1,2,3,4,5,D) 2,3,4,5,6,

考题 有以下程序void f(int *q){int i=0;for( ; i5;i++)(*q)++;}main(){int a[5]={1,2,3,4,5},i;f(a);for(i=0;i5;i++)printf(“%d,”,a[i]);}程序运行后的输出结果是( )。A.2,2,3,4,5,B.6,2,3,4,5,C.1,2,3,4,5,D.2,3,4,5,6,

考题 有以下程序:void f(int *x,int *y){ int *t; t=x; x=y ;y=t; *x=*y;}main(){ int a[8]={1,2,3,4,5,6,7,8},i,*p,*q; p=a;q=a[7]; while(pq) { f(p,q);p++;q--} for(i=0;i8;i++)printf("d,",a[i]);}程序运行后的输出结果是( )。A.8,2,3,4,5,6,7,1,B.5,6,7,8,1,2,3,4,C.1,2,3,4,5,6,7,8,D.8,7,6,5,4,3,2,1,

考题 有以下程序 void f(int *q) { int i=0; for(;i<5;i++) (*q)++; } main() { int a[5]={1,2,3,4,5},i; f(a); for(i=0;i<5;i++)printf("%d,",a[i]); } 程序运行后的输出结果是A.2,2,3,4,5,B.6,2,3,4,5,C.1,2,3,4,5,D.2,3,4,5,6,

考题 有以下程序: void f(int*q) {int i=0; for(;i<5;i++)(*q)++; } main() {int a[5]={1,2,3,4,5},i; f(A); for(i=0;i<5;i++)printf("%d,",a[i]); } 程序运行后的输出结果是( )。A.2,2,3,4,5,B.6,2,3,4,5,C.1,2,3,4,5,D.2,3,4,5,6,

考题 有以下程序includestdio.hint*f(int*p,int*q);main( ){int m=1,n=2,*r=m;r=f(r,stdio.hint*f(int*p,int*q);main( ){int m=1,n=2,*r=m;r=f(r,n);printf(”%d\n”,*r);}int-f(int*P,int*q)(return(*p*q)?p:q;)程序运行后的输出结果是______。

考题 有以下程序void f(int *q){int i=0;for(;i5; i++) (*q)++;}main(){int a[5] ={1,2,3,4,5}, i;f(a);for(i=0;i5; i++) printf("%d,", a[i]);}程序运行后的输出结果是A.2,2,3,4,5,B.6,2,3,4,5,C.1,2,3,4,5,D.2,3,4,5,6,

考题 若有以下程序: void g(int **q) { (**q) ++; (*q) ++; } void main() { int line [5]; int *p=line; for (i=0; i<5; i++) { *p=i; g(P); } for (i=0; i<5; i++) cout<<line[i]; cout<<end1; } 该程序运行后的输出结果为( )。A.12345B.1234C.11111D.55555

考题 有以下程序:include void f(int * x,int * y) int t;t= *x; *x= *y; *y=t;main ( ){in 有以下程序:#include <stdio.h>void f(int * x,int * y) int t; t= *x; *x= *y; *y=t;main ( ){ int a[8] = { 1,2,3,4,5,6,7,8} ,i, * p, * q; p=a;q =a[7]; while(p<q) { f(p,q) ;p ++ ;q --; } for(i =0;i<8;i ++ ) printf(" % d," ,a[i]); }程序运行后的输出结果是( )。A.8,2,3,4.,5,6,7,1,B.5,6,7,8,1,2,3,4,C.1,2,3,4,5,6,7,8,D.8,7,6,5,4,3,2,1,