#include <stdio.h>
int main(void) {
char d[20]; // 文字列を保存する配列 (最大20文字)
int i;
// 初期化 (任意)
for (i = 0; i < 20; i++) {
d[i] = '\0';
}
// ユーザーからの入力を受け取る
printf("Enter your name (e.g., Kanagawa_Tarou): ");
// 結果を表示
for (i = 0; d[i] != '\0'; i++) { // 文字列の終端 '\0' まで処理
printf("d[%d]=%c->%d\n", i
, d
[i
], d
[i
]); }
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSB7CiAgICBjaGFyIGRbMjBdOyAvLyDmloflrZfliJfjgpLkv53lrZjjgZnjgovphY3liJcgKOacgOWkpzIw5paH5a2XKQogICAgaW50IGk7CgogICAgLy8g5Yid5pyf5YyWICjku7vmhI8pCiAgICBmb3IgKGkgPSAwOyBpIDwgMjA7IGkrKykgewogICAgICAgIGRbaV0gPSAnXDAnOwogICAgfQoKICAgIC8vIOODpuODvOOCtuODvOOBi+OCieOBruWFpeWKm+OCkuWPl+OBkeWPluOCiwogICAgcHJpbnRmKCJFbnRlciB5b3VyIG5hbWUgKGUuZy4sIEthbmFnYXdhX1Rhcm91KTogIik7CiAgICBzY2FuZigiJXMiLCBkKTsKCiAgICAvLyDntZDmnpzjgpLooajnpLoKICAgIGZvciAoaSA9IDA7IGRbaV0gIT0gJ1wwJzsgaSsrKSB7IC8vIOaWh+Wtl+WIl+OBrue1guerryAnXDAnIOOBvuOBp+WHpueQhgogICAgICAgIHByaW50ZigiZFslZF09JWMtPiVkXG4iLCBpLCBkW2ldLCBkW2ldKTsKICAgIH0KCiAgICByZXR1cm4gMDsKfQo=