Your code simply cannot output a "D" for whatever reason. Not unless something really iffy happens, like a bug in the compiler or glibc. Or maybe a bitflip in memory.
The "D" is very likely due to the terminal you're using, but your code simply CANNOT output it.
Well, there is a very small chance. If you read more than INT_MAX
characters, then the signed integer c
will overflow, thus invoking undefined behavior. It's not likely that this would output a "D", but it's possible.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…