At first, I would appreciate that you have asked such a good question that most of the programmer won't even think about. In this article, I tried best to solve the matter.
Queue: Follows the principal First In First Out. The principal is similar to the priority followed while a queue of people waiting to buy new iPhones.
Input stream behaves like a queue. Consider it as a Scooby Doo. Even what It has eaten is enough for it's day it won't stop eating. If someone offers two tonnes of food in the breakfast, Scooby will eat all the breakfast and still asks for the Lunch.
The input stream is similar to Scooby Doo. Look this code!
char c=getchar();
Here one character is enough for c but when you run this code. You can type as many characters as you want in the console but no matter what when you press enter your enter: c will assign to the first character you had typed.
But notice that checking for EOF is bad practice because of so many reasons I will list the reasons at the end.
When coming to your Question!. Why is the character not printed one by one?
Studying about stream itself is a big area. So just for your convenience think, that input stream will have some hidden file(Queue) to store whatever character you have typed.
Typing character in the stream is like a machine gun firing continuously. There is no option you have to wait for the machine gun to stop firing for doing the counter-attack.
Likewise, while you are typing the character in the stream the file will simply push each character into it. Once you have typed enter or the EOF command 'Cntl+D'.
Then your code will look into the file character by character(Remember the principal first IN). If a condition meets it will stop executing there and it won't care about the next the remaining characters in the file.
In your case, it will look all the characters in the file after the user types enter or EOF command and it will change their cases(upper to lower and vice-versa)
As I promised!
Why one should not check for EOF!
One reason is that the keystroke that creates an end-of-file condition from the
keyboard is not standard, but differs between platforms.
Another reason is that terminating the program is best done more explicitly
(e.g. with a "quit" command).
A third reason is that other error conditions might arise, and this check will not detect them.
So try to avoid it.