You should use the debugger to go through your code line by line and see what is happening with your variables.
You are overwriting the answer from the user with the solution. Then you use == instead of strcmp, and you never defined the variable Coffin. Also, the only way your code reaches your elseif is if the two arrays don't match. So the only way that condition will be false is if there is a cosmic ray that changes a bit in your memory in the microseconds between the evaluation of the two conditions. (so you can replace that elseif with else)