I have a difficulty understanding getchar(). In the following program getchar works as expected:
getchar()
getchar
#include int mai
after taking command input flush the stdin.
fflush(stdin);
but flushing a input stream results in undefined behavior (though Microsoft's C library defines the behaviour as an extension).