In the C Programming Language, the fflush function writes any unwritten data in stream's buffer. If stream is a null pointer, the fflush function will flush all streams with unwritten data in the buffer.
All the characters have ASCII value associated with it in C programming. So internally it checks the ASCII value of user entered character against the ASCII values of “A” to “Z”. ASCII value range of upper case alphabets:ASCII value of A is 65.ASCII value of B is 66.ASCII value of...
But if you compile and run it (which I encourage you to do, if you're still unfamiliar with this problem), you'll see something weird, and you will find yourself (I guarantee it) askingquestion 12.18in the comp.lang.c FAQ list: “I'm reading a number withscanf %dand then a string...
on the same line of the output (eg. HelloC:\or Helloarmy1987@a rmy1987-laptop:~$ or whatever). Anyway, if you're going to use that in a longer program, this forces the output to be shown immediately (this is only required when newlines are printed and stdout is interactive). This...
to read from the stream is mandatory. In such an instance, fflush() itself does not necessarily have to appear: fseek() will also trigger the necessary flushing. -- Programming is what happens while you're busy making other plans.