質問編集履歴
1
int str_lengthを一番上に持ってきてみました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -30,25 +30,27 @@
|
|
30
30
|
|
31
31
|
|
32
32
|
|
33
|
-
###
|
33
|
+
###該当のソースコード
|
34
|
+
|
35
|
+
#include<stdio.h>
|
36
|
+
|
37
|
+
int str_length(const char s[])
|
38
|
+
|
39
|
+
{
|
40
|
+
|
41
|
+
int len = 0;
|
34
42
|
|
35
43
|
|
36
44
|
|
37
|
-
|
45
|
+
while (s[len])
|
38
46
|
|
47
|
+
len++;
|
39
48
|
|
49
|
+
return len;
|
40
50
|
|
41
|
-
|
51
|
+
}
|
42
52
|
|
43
|
-
```
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
#include<stdio.h>
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
int main(void)
|
53
|
+
int main(void)
|
52
54
|
|
53
55
|
|
54
56
|
|
@@ -75,26 +77,6 @@
|
|
75
77
|
while((ch[2000] = fgetc(fp))!=EOF){
|
76
78
|
|
77
79
|
printf("%c",ch[2000]);
|
78
|
-
|
79
|
-
}
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
int str_length(const char s[])
|
86
|
-
|
87
|
-
{
|
88
|
-
|
89
|
-
int len = 0;
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
while (s[len])
|
94
|
-
|
95
|
-
len++;
|
96
|
-
|
97
|
-
return len;
|
98
80
|
|
99
81
|
}
|
100
82
|
|