回答編集履歴

3

「追加」

2018/06/30 10:23

投稿

cateye
cateye

スコア6851

test CHANGED
@@ -8,4 +8,62 @@
8
8
 
9
9
 
10
10
 
11
- ・・・理由は考えて・・・頑張って下さいv^^
11
+ ・・・理由は考えて・・・頑張って下さいv
12
+
13
+ [追加]
14
+
15
+ ----->8----->8----->8----->8----->8-----
16
+
17
+ ```c
18
+
19
+ usr~/test/c % ./a.out
20
+
21
+ testinport
22
+
23
+ estinport
24
+
25
+ stinport
26
+
27
+ tinport
28
+
29
+ inport
30
+
31
+ nport
32
+
33
+ port
34
+
35
+ ort
36
+
37
+ rt
38
+
39
+ t
40
+
41
+
42
+
43
+ usr~/test/c % cat ct.c
44
+
45
+ #include <stdio.h>
46
+
47
+
48
+
49
+ int main(void)
50
+
51
+ {
52
+
53
+ char str[10] = "testinport";
54
+
55
+
56
+
57
+ for (int i= 0; str[i]; i++) {
58
+
59
+ printf("%s\n", &str[i]);
60
+
61
+ }
62
+
63
+
64
+
65
+ return 0;
66
+
67
+ }
68
+
69
+ ```

2

誤記修正

2018/06/30 10:23

投稿

cateye
cateye

スコア6851

test CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  また、printf("%s" ,str[i]);はprintf("%s" ,&str[i]);としないと表示できません。
6
6
 
7
- for(;i<= sizeof(str) /sizeof(str[0]);i++){は、for(;i<= str[i];i++){でもいけますd^^
7
+ for(;i<= sizeof(str) /sizeof(str[0]);i++){は、for(;str[i];i++){でもいけますd^^
8
8
 
9
9
 
10
10
 

1

誤記修正

2018/06/30 03:37

投稿

cateye
cateye

スコア6851

test CHANGED
File without changes