-->
当前位置:首页 > 题库

PROGRAMMING:One dimensional array initialization code analysis

Luz5年前 (2021-05-10)题库465
Please analyze the following code to understand array initialization.
```
#include
int main(){
int i;
int a[10]={1,2,3,4,5,6,7,8,9,10,11,12,13};
int b[10]={};
for(i=0; i<10; i++)
printf("%d ",a[i]);
printf(".\n");
for(i=0; i<10; i+=2)
b[i]=a[i]*a[i]-1;
for(i=0; i<10; i++)
printf("%d ",b[i]);
printf(".\n");
return 0;
}
```
###Input example:
```in
```
###Output example:
```out
1 2 3 4 5 6 7 8 9 10 .
0 0 8 0 24 0 48 0 80 0 .
```







answer:If there is no answer, please comment