Let's look at order of operations to see why it doesn't work. In the link provided below, the relational operator is called first, then the logical OR.
Therefore: ( answer == "y" || "Y")
is the same as: ((answer == "y")|| "Y")
The || operator expects a TRUE or FALSE on both the left and right sides. So now let's think of the definition of TRUE. It is defined as NOT ZERO. If you look at the bits of "Y" you'll see that it is not zero. In other words, it's TRUE, so this can be further reduced to: ((answer == "y")|| true)
And we know that true OR anything is true. Therefore our statement will return true regardless of what answer is so our if statement reduces to: if (true)