回答編集履歴
1
update
test
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
```c
|
2
|
+
|
3
|
+
#include <stdio.h>
|
4
|
+
|
5
|
+
|
2
6
|
|
3
7
|
int value = 18;
|
4
8
|
|
5
|
-
char output[3];
|
9
|
+
char output[3]; /* 2桁+終端 = 3文字 */
|
6
10
|
|
7
11
|
snprintf(output, 3, "%d", value);
|
8
12
|
|