Character Reading Problem with scanf() in C
If you encountered this article and you are reading it, you are most likely dealing with the same problem. You're doing a practice or an application with C, where you need to get input from the keyboard successively, whoops, you suddenly realize that you couldn't read some of the entries, some of the variables just contains an unexpected \n (new line) character. So now what? Let's illustrate the problem with an example snippet of code: #include int main() { char character0; char character1; char character2; char character3; printf("Character0: "); scanf("%c", &character0); printf(