update array with C code
This commit is contained in:
parent
b963759d81
commit
147265767f
@ -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#"
|
||||
|
Loading…
Reference in New Issue
Block a user