When and where to use fflush (stdout)?

This is a discussion on When and where to use fflush (stdout)? within the C Programming forums, part of the General Programming Boards category; Hi,
I found this simple code
Code:
#include <stdio.h>
#include <ctype.h>
#include <conio.h>
int main ( void )
{
int ...

What I noticed is fflush function call On an output stream, fflush causes any buffered but unwritten data to be written;
I cannot figure out why fflush (stdout) is called here in this code
I try to comment this line and behavior was exactly the same.
Can someone explain what is purpose of calling fflush (stdout) for output stream here and general?

> I cannot figure out why fflush (stdout) is called here in this code
> I try to comment this line and behavior was exactly the same.
Because you're not guaranteed to see previous printf() output if that output doesn't end in a newline.

Basically, you only need it if you're displaying say a prompt without a newline, and you want to make sure the user can see it.