题目内容

以下程序运行结果为( )#include int Max(int *a,int n){ int i,max = a[0]; for(i = 1;i < n;i++) {if(a[i] > max)max = a[i]; } return max;}int main(){ int x,a[5] = {4,3,2,1,0}; x = Max(a,5); printf("%d",x); return 0;}

查看答案
更多问题

下面程序的运行结果是_____________________#include int main(void){ int x[] = {1,2,3}; int s = 1, i, *p = x; for (i=0; i<3; i++) {s*= *(p + i); } printf("%d\n", s); return 0;}

以下程序的输出结果是( )#includeint main(){ int i,b[6]={1,2,3,4,5,6},*ptr=b; for(i=0;i<3;i++)b[i*2]*=2; for(i=0;i<6;i++)printf("%d ",ptr[i]);}

以下程序的运行结果是#include#define N 8void fun(int *x,int i){*x=*(x+i);}int main(){int a[N]={1,2,3,4,5,6,7,8},i;fun(a,2);for(i=0;i

以下程序的输出结果是_____________int main(){ int a[]={1,2,3,4},y,*p=&a[3]; --p; y=*p; printf("%d\n",y); return 0;}

答案查题题库