// Template for Palindrome #include // We don't know in advance how many characters will be in the input // // That's why we make the array big enough to contain the // largest possible input. Actually, we need to make it one bigger // than the largest possible input. I won't explain here, but you // can take a look at https://www.learncpp.com/cpp-tutorial/c-style-strings/ // if you're curious. char line[100001]; int N; int main() { // Read the input. // Notice that unlike with reading integers, we don't have an // ampersand (&) before "line". // // Notice that although N and the string are on different lines, // we still only separate them by a space in the format string ("%d %s"). // This is because a space in the format string actually means "any number // of whitespace characters" (which includes spaces, tabs and newlines). scanf("%d %s", &N, line); for(int i = 0; i < N; i++) { // TODO: Replace this with a proper solution line[i] = '?'; } printf("%s\n", line); }