Posts Tagged ‘stdout’
Standard Output in C
Posted December 17, 2008
on:- In: C/CPP
- Leave a Comment
“stdout” flushes the data to be printed to standard output device only after getting an new line character. If it wont get a new line character, it waits until the program ends, then it flushes the data.
Ex:
Code:
#include<stdio.h>
int main()
{
fprintf(stdout,”hello-out1 \n”);
fprintf(stdout,”hello-out2 “);
fprintf(stderr,”hello-err “);
return 0;
}
Output:
hello-out1
hello-err hello-out2