C 数组
```C
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
int main(void) {
int candy[365];
int test_array[5] = { 1,2,3,4,5 };
int test_not_init[5];
#define MONTH 12
int days[MONTH] = { 31,28,31,30,31,30,31,31,30,31,30,31 };
int index;
for (index = 0; index < MONTH; index++) {
printf("Month %2d has %2d days.\n", index + 1, days[index]);
}
for (index = 0; index < 5; index++) {
printf("%d \n", test_not_init[index]);
}
int test_array_short[5] = { 1,2,3 };
for (index = 0; index < 5; index++) {
printf("%d \n", test_array_short[index]);
}
int test_array_simple[] = { 1,2,3 };
int test_array_simple_length = sizeof(test_array_simple) /sizeof( test_array_simple[0]);
printf("The length of test_array_simple is %d \n", test_array_simple_length);
int test_designated_initializer[5] = { [4]=224 };
int test_init_1[] = { 1,2,4 };
int test_init_2[3];
printf("下标越界测试");
for (index = 0; index < 10; index++) {
printf("index : %d value : %d \n", index, test_init_1[index]);
}
}