I ran the following program under cygwin/gcc 4.7.3 and VS 2010.
#include <stdio.h>
int main()
{
printf("This is a test.\n");
return 0;
}
The output of running the program under those environments showed that VS 2010 treats stdout
as a text stream.
Questions:
- Is
stdout
required to be a text stream? - Is an implementation free to choose whether it uses a text stream or a binary stream for
stdout
?
EDIT
The question of how to write to stdout
in binary mode is different from whether stdout
is required to be a text stream or a binary stream.