In this post, some advise for beginners.
Do you need print some debug info using printf and it print at the wrong time or does not print nothing? Don’t remember to flush the buffer, which is in the output. You have to use command fflush ().
Printf ("Some debug information"); fflush (stdout);
Stdout is the abbreviation for the standard output to the console. Fflush command can be used when working with files too. In this case, with variable of type FILE *.