有以下程序#includestdio.hvoid fun(int *s){ static int j=0;do { s[j]=s[j]+s[j+1]; )while(++j2);}main( ){ int k,a[10]={1,2,3,4,5);for(k=1;k3;k++)fun(a);for(k=0;k5;k++)printf(”%d”,a[k]);printf("\n");}程序运行后的输出结果是A) 12345B)23445C)34756D) 35745

有以下程序

#include<stdio.h>

void fun(int *s)

{ static int j=0;

do { s[j]=s[j]+s[j+1]; )while(++j<2);

}

main( )

{ int k,a[10]={1,2,3,4,5);

for(k=1;k<3;k++)fun(a);

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

printf("\n");

}

程序运行后的输出结果是

A) 12345

B)23445

C)34756

D) 35745


相关考题:

有以下程序#include stdio.hvoid fun(int *s,int nl,int n2){ int i,j,t;i=nl; j=n2;while(ij) {t=s[i];s[i]=s[j];s[j]=t;i++;j--;}}main( ){ int a[10]={1,2,3,4,5,6,7,8,9,0},k;fun(a,0,3); fun(a,4,9); fun(a,0,9);for(k=0;k10;k++)printf("%d",a[k]); printf("\n");}程序运行的结果是 ( )A)0987654321B)4321098765C)5678901234D)0987651234

有以下程序inclUdevoidfun(int*s,intn1,intn2){inti,j,t;i=n1;j=n2;while(i 有以下程序 #inclUde <stdio.h> void fun(int *s,int n1,int n2) { int i,j,t; i=n1; j=n2; while(i<j) {t=s[i];s[i]=s[j];s[j]=t;i++;j--;} } main() { int a[10]={1,2,3,4,5,6,7,8,9,0},k; fun(a,0,3); fun(a,4A.0987654321B.4321098765C.5678901234D.0987651234

有以下程序: #includestdio.h void fun(int*s) { static int i=0; do{s[J]=s[J]+s[j+I];}while(++j2); } main( ) { int k.a[l0]={1,2,3,4,5}; for(k=1;k3;k++)fun(a); for(k=0;k5;k++)pfintf("%d",a[k]); printf("\n"); } 程序运行后的输出结果是( )。A.12345B.23445C.34756D.35745

请读程序: include void fun(int * s) { static int j=0; do s[j]+=s[j+1] 请读程序: # include<stdio.h> void fun(int * s) { static int j=0; do s[j]+=s[j+1] while( + + j<2); } main( ) { int k,a[10]={l,2,3,4,5}; for(k=l;k<3;k+ +)fun(a); for(k=0;k<5;k++)prinf("%d",a[k]); } 上面程序的输出结果是 ( )A.34756B.23445C.35745D.12345

有下列程序: include void fun(int * s,int n1,int n2) { int i,j, 有下列程序: #include <stdio.h> void fun(int * s,int n1,int n2) { int i,j,t; i=n1;j=n2; while(i<j){t=s[i];s[i]=s[j];s[j]=t;i++;j--;} } main() { int a[10]={1,2,3,4,5,6,7,8,9,0},k; fun(a,0,3); fun(a,4,9);fun(a,0,9); for(k=0;k<10;k++)printf("%d",a[k]);printf("\n"); } 程序的运行结果是( )。A.987654321B.4321098765C.5678901234D.987651234

有下列程序: #includestdi0.h voidfun(int*S,intn1,intn2) { inti,j,t; i=n1;j=n2 while(ij){t=s[i];s[i]=s[j];s[j]=t;i++;j --;} } voidmain( ) { inta[10]={1,2,3,4,5,6,7,8,9,0),k; fun(a,0,3);fun(a,4,9);fun(a,0,9); for(k=0;k10;k++)printf(”%d”,a[k]);printf ("\n"); } 程序的运行结果是( )。A.0987654321B.4321098765C.5678901234D.0987651234

有以下程序#include stdio.hvoid fun(int *s,int n1,int n2){ int i,j,t;i=n1; j=n2;while(ij) {t=s[i];s[i]=s[j];s[j]=t;i++;j--;}}main(){ int a[10]={1,2,3,4,5,6,7,8,9,0},k;fun(a,0,3); fun(a,4,9); fun(a,0,9);for(k=0;kl0;k++)printf("%d",a[k]); printf("\n");}程序的运行结果是A.0987654321B.4321098765C.5678901234D.0987651234

有以下程序includevoidfun(int*s,intn1,intn2){inti,j,t; i=n1j=n2; while(i 有以下程序 #include <stdio.h> void fun(int *s,int n1,int n2) { int i,j,t; i=n1 j=n2; while(i<j) {t=s[i];s[i]=s[j];s[j]=t;i++;j--;} } main() { int a[10]={1,2,3,4,5,6,7,8,9,0},k; fun(a,0,3); fun(a,4,9); fun(a,0,9); for(k=0;k<10;k++)printf("%d",a[k]); printf("\n"); } 程序的运行结果是A.987654321B.4321098765C.5678901234D.987651234

以下程序的输出结果是 void fun(int*s) { static int j=0; do s[j]+=s[j+1]; while(++j<2);} main() { int k,a[10]={1,2,3,4,5}; for(k=1;k<3;k++)fun(a); for(k=0;k<5;k++)printf("%d",a[k]);}A.34756B.23345C.35745D.12345