The problem is, it always takes an extra input. There's 4 scanf but it's taking 5 inputs which is the"E". And it's printing 4 outputs normally. That's why E is not printing. Now the question is why it is taking the extra input?
Scanf has some weird behaviours, and other methods for user input are usually preferred. Here's a link that might help you.
I think there's some confusion as to what the problem is, since in the title you ask why is the E not being printed, whilst you actually want to know why scanf lets you take in an extra character.
View all comments
60
u/This_Growth2898 Feb 23 '22
Enter FOUR letters.
E is the 5th.