#include<stdio.h>
typedef struct {
char str[100];
int modify_index;
char modify_ch;
} DATA;
void abc(DATA * dt)
{
dt->str[dt->modify_index] = dt->modify_ch;
}
int main(void)
{
DATA d;
for (d.modify_index = 0; d.modify_index <= 7; d.modify_index++) {
d.modify_ch = '0' + d.modify_index;
abc(&d);
}
d.modify_ch = '\0';
abc(&d);
return 0;
}
I2luY2x1ZGU8c3RkaW8uaD4KCnR5cGVkZWYgc3RydWN0IHsKICAgIGNoYXIgICAgc3RyWzEwMF07CiAgICBpbnQgICAgIG1vZGlmeV9pbmRleDsKICAgIGNoYXIgICAgbW9kaWZ5X2NoOwp9IERBVEE7Cgp2b2lkIGFiYyhEQVRBICogZHQpCnsKICAgIGR0LT5zdHJbZHQtPm1vZGlmeV9pbmRleF0gPSBkdC0+bW9kaWZ5X2NoOwp9CgppbnQgbWFpbih2b2lkKQp7CiAgICBEQVRBIGQ7CgogICAgZm9yIChkLm1vZGlmeV9pbmRleCA9IDA7IGQubW9kaWZ5X2luZGV4IDw9IDc7IGQubW9kaWZ5X2luZGV4KyspIHsKICAgICAgICBkLm1vZGlmeV9jaCA9ICcwJyArIGQubW9kaWZ5X2luZGV4OwogICAgICAgIGFiYygmZCk7CiAgICB9CiAgICBkLm1vZGlmeV9jaCA9ICdcMCc7CiAgICBhYmMoJmQpOwogICAgcHJpbnRmKCJzdHIgPSAlc1xuIiwgZC5zdHIpOwoKICAgIHJldHVybiAwOwp9Cg==