问题
单项选择题
以下程序段的输出结果是 ______。
#include<iostream.h>
void main()
int x[]二9,7,5,3,1),y=0,j,*p=&x[2];
for(j=0;i<3;j++)
y+=*(p+j);
cout<<y;
A.7
B.8
C.9
D.10
答案
参考答案:C
以下程序段的输出结果是 ______。
#include<iostream.h>
void main()
int x[]二9,7,5,3,1),y=0,j,*p=&x[2];
for(j=0;i<3;j++)
y+=*(p+j);
cout<<y;
A.7
B.8
C.9
D.10
参考答案:C