Ask question about fprintf function
I want to ask about this source code
************************************
for (bitm=16;bitm>=0;--bitm)
{
outbit(outp,(bitpattern&(1<<bitm)) ? 1 : 0);
}
************************************
bitpattern in the source code is 1 and 0 stream
example of bitpattern = 10011011101110001
function outbit above has this implement
************************************
void outbit(FILE *fp, int bit)
{
fprintf(fp, bit ? "1" : "0");
}
************************************
I read in MSDN about fprinf
This is Remarks in MSDN
"fprintf formats and prints a series of characters and values to the output stream. Each function argument (if any) is converted and output according to the corresponding format specification in format. For fprintf, the format argument has the same syntax and use that it has in printf. "
I want to ask some question about fprintf function. I think that function write the series of characters to the output stream in the format 0 and 1 but I want to print white and black on the paper (0 = white , 1 = black). I think fprintf only prints a series of characters 0 and 1 to the output stream not print on paper. If you know about how to use that stream to print black and white on the paper please the me and if you can show the example source to do that please show me. Thank you for your answer.