#include <stdio.h>
int main(void) {
char d[10];
int i;
// 配列を初期化
for (i = 0; i < 10; i++) {
d[i] = 'g';
}
// 入力の読み取り(9文字まで安全に取得)
printf("Enter a string (up to 9 characters): ");
// 配列の内容を表示
for (i = 0; i < 10; i++) {
printf("d[%d]=%c->%d\n", i
, d
[i
], d
[i
]); }
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSB7ICAgIAogICAgY2hhciBkWzEwXTsgICAgCiAgICBpbnQgaTsgICAgCiAgICAKICAgIC8vIOmFjeWIl+OCkuWIneacn+WMlgogICAgZm9yIChpID0gMDsgaSA8IDEwOyBpKyspIHsKICAgICAgICBkW2ldID0gJ2cnOwogICAgfQoKICAgIC8vIOWFpeWKm+OBruiqreOBv+WPluOCiu+8iDnmloflrZfjgb7jgaflronlhajjgavlj5blvpfvvIkKICAgIHByaW50ZigiRW50ZXIgYSBzdHJpbmcgKHVwIHRvIDkgY2hhcmFjdGVycyk6ICIpOwogICAgc2NhbmYoIiU5cyIsIGQpOwoKICAgIC8vIOmFjeWIl+OBruWGheWuueOCkuihqOekugogICAgZm9yIChpID0gMDsgaSA8IDEwOyBpKyspIHsKICAgICAgICBwcmludGYoImRbJWRdPSVjLT4lZFxuIiwgaSwgZFtpXSwgZFtpXSk7CiAgICB9CiAgICByZXR1cm4gMDsKfQo=