Is to check if something is actually available for reading before reading…
Yes, of course, I call Serial.available() first - I omitted that in my snippet for brevity.
Then you should never get -1
Exactly, so it's safe to declare c as a char.
yes, if you are sure there is something to read, then when you do
char c = Serial.read();
it causes an implicit type conversion from int to char and during this conversion, only the least significant byte of the integer is retained which is what you want.
Exactly!
BTW — mind UTF8 multi bytes characters if you work with the wokwi simulator and partial data input along the way.