回答編集履歴
2
フォーマット修正
test
CHANGED
@@ -70,6 +70,8 @@
|
|
70
70
|
|
71
71
|
```
|
72
72
|
|
73
|
+
|
74
|
+
|
73
75
|
出力
|
74
76
|
|
75
77
|
```
|
@@ -82,4 +84,4 @@
|
|
82
84
|
|
83
85
|
100 in main()
|
84
86
|
|
85
|
-
``
|
87
|
+
```
|
1
コードを整形
test
CHANGED
@@ -26,13 +26,17 @@
|
|
26
26
|
|
27
27
|
#include <stdio.h>
|
28
28
|
|
29
|
+
|
30
|
+
|
29
31
|
int* readA(void) {
|
30
32
|
|
31
|
-
int ages[4]; //仮に1000~1015番地
|
33
|
+
int ages[4]; //仮に1000~1015番地
|
32
34
|
|
33
|
-
return ages;
|
35
|
+
return ages;
|
34
36
|
|
35
37
|
}
|
38
|
+
|
39
|
+
|
36
40
|
|
37
41
|
void func(void) {
|
38
42
|
|
@@ -46,19 +50,21 @@
|
|
46
50
|
|
47
51
|
}
|
48
52
|
|
53
|
+
|
54
|
+
|
49
55
|
int main(void) {
|
50
56
|
|
51
|
-
int* a = readA();
|
57
|
+
int* a = readA();
|
52
58
|
|
53
|
-
printf("a = %p in main()\n", a);
|
59
|
+
printf("a = %p in main()\n", a);
|
54
60
|
|
55
|
-
a[0] = 19;
|
61
|
+
a[0] = 19;
|
56
62
|
|
57
|
-
func();
|
63
|
+
func();
|
58
64
|
|
59
|
-
printf("%d in main()\n", a[0]);
|
65
|
+
printf("%d in main()\n", a[0]);
|
60
66
|
|
61
|
-
return 0;
|
67
|
+
return 0;
|
62
68
|
|
63
69
|
}
|
64
70
|
|
@@ -76,4 +82,4 @@
|
|
76
82
|
|
77
83
|
100 in main()
|
78
84
|
|
79
|
-
``
|
85
|
+
``
|