回答編集履歴
1
コードの変更
test
CHANGED
@@ -3,6 +3,14 @@
|
|
3
3
|
|
4
4
|
|
5
5
|
```C
|
6
|
+
|
7
|
+
#include <stdio.h>
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
#define MAX_LEN 5
|
12
|
+
|
13
|
+
|
6
14
|
|
7
15
|
void swap(char **s1, char **s2)
|
8
16
|
|
@@ -18,4 +26,30 @@
|
|
18
26
|
|
19
27
|
}
|
20
28
|
|
29
|
+
|
30
|
+
|
31
|
+
int main(void)
|
32
|
+
|
33
|
+
{
|
34
|
+
|
35
|
+
char *a = "Hello";
|
36
|
+
|
37
|
+
char *b = "World";
|
38
|
+
|
39
|
+
printf("%s %s\n", a, b);
|
40
|
+
|
41
|
+
swap(&a, &b);
|
42
|
+
|
43
|
+
printf("%s %s\n", a, b);
|
44
|
+
|
45
|
+
return 0;
|
46
|
+
|
47
|
+
}
|
48
|
+
|
49
|
+
/* 実行 */
|
50
|
+
|
51
|
+
/* $ gcc -O -Wall -pedantic -ansi -o t test.c */
|
52
|
+
|
53
|
+
/* $ ./t */
|
54
|
+
|
21
55
|
```
|