Hi
Can you help me understand with some level of detail (I guess that we overflow the stdin buffer on purpose, however the details escape me) what leads to the output of the code below for an input of "ululul" to be "ULULUL" instead of what I would expect to be "uUlLuUlLuUlL"?
Code:#include <stdio.h> #include <ctype.h> int main() { char c; printf("Insert a word [Press enter to finish]\n"); //fflush(stdin); do { scanf("%c", &c); printf("%c", toupper(c)); }while(c != '\n'); return(0); }