执行以下程序后,y的值是 ( ) main( ) { int a [ ]={2,4,6,8,10); int y=1,x, *p; p=a[1]; for(x=0;x<3; x + +) y + =* (p + x); printf("%d\n",y); }A.17B.18C.19D.20
执行以下程序后,y的值是 ( ) main( ) { int a [ ]={2,4,6,8,10); int y=1,x, *p; p=&a[1]; for(x=0;x<3; x + +) y + =* (p + x); printf("%d\n",y); }
A.17
B.18
C.19
D.20
相关考题:
有以下程序intā*f(int*x,int*y){ if(*x<*y)return x;elsereturn y;}main( ){ int a=7,b=8,*p,*q,*r;p=a;q=b;r=f(p,q);cout<<*p<<","<<*q<<","<<*r<<endl;}执行后输出结果是A.7,8,8B.7,8,7C.8,7,7D.8,7,8
执行以下程序后,y的值是 ( ) main( ) { int a[]={2,4,6,8,10}; int y=1,x,*p; p=&a[1]; for(x=0;x<3;x+ +) y+=* (p+x); printf("%d\n",y); }A.17B.18C.19D.20
有以下程序:include main() {int a[] = {2,4,6,8,10} ,y =0,x, * p;p =a[1];for( 有以下程序: #include <stdio.h> main() { int a[] = {2,4,6,8,10} ,y =0,x, * p; p =a[1]; for(x=1;x<3;x++)y+ =p[x]; printf( "% d \n" , y); }程序运行后的输出结果是( )。A.10B.11C.14D.15
有以下程序: main() {int a[]={2,4,6,8,10},y=0,x,*p; p=a[1]; for(x=1;x<3;x++)y+=p[x]; printf("%d\n",y); } 程序运行后的输出,结果是 ______。A.10B.11C.14D.15
有以下程序: int*f(int*x,int*y) { if(*x<*y) return x; else return y; } main() { int a=7,b=8,*P,*q,*r; P=a; q=&b; r=f(p,q); print("% d,% d,% d\n",*P,*q,*r); } 执行后的输出结果是 ______。A.7,8,8B.7,8,7C.8,7,7D.8,7,8
有以下程序: main() {int a[]={2,4,6,8,10},y=0,x,*p; p=a(1); for(x=1;x<3;x++) y+=p[x]; printf("%d\n",y); } 程序运行后的输出结果是 ______。A.10B.11C.14D.15
有以下程序*f(int * x,int * y) { if( * x< * y) return x; else return y; } main() { int a=7.b=8, * p, * q, * r; p=a; q=b: r=f(p,q); coat<< * p<<","<< * q<<","<< * r<<end1; } 执行后输出结果是A.7,8,8B.7.8,7C.8,7,7D.8.7,8
有以下程序: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,
执行以下程序段后,y的值是()。 int a[]={2,4,6,8,10}; int y=1,x,* p; p=a[1]; for(x=0;x<3;x++) y+=*(p+x); printf("%dn",y);A.17B.18C.19D.20