質問編集履歴
1
新たな問題を追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -51,3 +51,45 @@
|
|
51
51
|
str2は100
|
52
52
|
|
53
53
|
```
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
追加でやってみました。同じ文字列を出力させても文字数が変わります。
|
60
|
+
|
61
|
+
```c
|
62
|
+
|
63
|
+
char str1[100]="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
|
64
|
+
|
65
|
+
char str2[100]="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
|
66
|
+
|
67
|
+
char str3[100]="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
|
68
|
+
|
69
|
+
char str4[100]="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
printf("%lu\n", strlen(str1));
|
74
|
+
|
75
|
+
printf("%lu\n", strlen(str2));
|
76
|
+
|
77
|
+
printf("%lu\n", strlen(str3));
|
78
|
+
|
79
|
+
printf("%lu\n", strlen(str4));
|
80
|
+
|
81
|
+
return 0;
|
82
|
+
|
83
|
+
```
|
84
|
+
|
85
|
+
```terminal
|
86
|
+
|
87
|
+
102
|
88
|
+
|
89
|
+
101
|
90
|
+
|
91
|
+
101
|
92
|
+
|
93
|
+
110
|
94
|
+
|
95
|
+
```
|