#include <stdio.h>
int main(void) {
char d[50];
int i = 0;
// Read a string from input
// Iterate through the string
while (d[i] != '\0') {
printf("d[%d]=%c->%d\n", i
, d
[i
], d
[i
]); i++; // Increment the index
}
return 0; // Corrected return statement
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSB7CiAgICBjaGFyIGRbNTBdOwogICAgaW50IGkgPSAwOwoKICAgIC8vIFJlYWQgYSBzdHJpbmcgZnJvbSBpbnB1dAogICAgc2NhbmYoIiVzIiwgZCk7CgogICAgLy8gSXRlcmF0ZSB0aHJvdWdoIHRoZSBzdHJpbmcKICAgIHdoaWxlIChkW2ldICE9ICdcMCcpIHsKICAgICAgICBwcmludGYoImRbJWRdPSVjLT4lZFxuIiwgaSwgZFtpXSwgZFtpXSk7CiAgICAgICAgaSsrOyAvLyBJbmNyZW1lbnQgdGhlIGluZGV4CiAgICB9CgogICAgcmV0dXJuIDA7IC8vIENvcnJlY3RlZCByZXR1cm4gc3RhdGVtZW50Cn0=