回答編集履歴
1
修正・リンクの追加
test
CHANGED
@@ -3,6 +3,8 @@
|
|
3
3
|
```C
|
4
4
|
|
5
5
|
#include <stdio.h>
|
6
|
+
|
7
|
+
#define SIZE(n) (sizeof(n) / sizeof(n[0]))
|
6
8
|
|
7
9
|
|
8
10
|
|
@@ -16,7 +18,7 @@
|
|
16
18
|
|
17
19
|
|
18
20
|
|
19
|
-
for(i
|
21
|
+
for(size_t i = 0; i < SIZE(data); ++i) {
|
20
22
|
|
21
23
|
printf("%d\n", data[i]);
|
22
24
|
|
@@ -33,3 +35,7 @@
|
|
33
35
|
}
|
34
36
|
|
35
37
|
```
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
[Wandbox](https://wandbox.org/permlink/3j23Eq968BbiRVlW)
|