update array with C code

This commit is contained in:
ayuan 2023-01-04 11:54:27 +08:00 committed by GitHub
parent b963759d81
commit 147265767f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,8 +69,8 @@ comments: true
```c title="array.c"
/* 初始化数组 */
int nums[8] = {1, 2, 4, 8, 16 ,32 ,64}; /* 从ANSI C开始支持这种初始化 即完全初始化 */
int arr[5] = {1, 2}; /* 不完全初始化 未初始化的元素会被置0 */
int days[12] = {31, 28, [4] = 31, 30, 31, [1] = 29}; /* 从C99开始支持 指定初始化器 即指定数组中某一位元素的数值 */
int arr[5] = {1, 2}; // 不完全初始化 未初始化的元素会被置 0
int days[12] = {31, 28, [4] = 31, 30, 31, [1] = 29}; // 从C99开始支持 指定初始化器 即指定数组中某一位元素的数值
```
=== "C#"