Hello. I'm not exactly sure whether or not this is a silly question, but I guess I will find out soon enough.
I'm having problems understanding exactly how getc
and getwc
work. It's not that I can't use them, but more like I don't know exactly what they do. int
and getc
return most characters if I `printf("%c") them, including multibyte like € or even £.
My question is: how exactly do these functions work, how do they read stdin exactly? Explanations and good pointers to docs much appreciated.
Edit: Please, read the comment I left in William's answer. It helps clarify the level of detail I'm after.