study/C_C++/sources/offer/test.c

11 lines
154 B
C

#include <stdio.h>
int main(){
int y = 1,x,a[] ={2,4,6,8,10},*p;
p = &a[1];
for(x = 0;x<3;x++){
y = y + *(p+x);
}
printf("%d \n ",y);
return 0;
}