The stdout stream is buffered,so only when it meets a new line or told to display can it show what you wanna show.
So if you want to display your print whenever you execute the related code,you can use:
fprintf(stderr,"I want to display these message at once");
Or you can just add the flush code,like:
printf("these words will be stored in the buffer IoI");
fflush(stdout);
Also you can just disable the buffering on the stdout,like:
setbuf(stdout,NULL);
Ok,Here has no buffer in stdout,you reach your goal~