#include void change(int *aa,int bb) { *aa=*aa*2+1; bb=bb+3;} int main(){ int a=6,b=5; change(&a,b); printf("%d %d\n",a,b); return 0;}以上程序的运行结果是( )
查看答案
以下程序运行结果为( )#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