题目内容

下面程序的运行结果是_____________________#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;}

以下程序运行后的输出结果是( )#includeint main(){int i,array[10]={1,2,3,4,5,6,7,8,9,10},sum=0;int *p=array+1;for(i=0;i<4;i++)sum+=*(p+i*2);printf("sum=%d\n",sum);return 0;}

答案查题题库