C Programming - Library Functions - Discussion
Discussion Forum : Library Functions - General Questions (Q.No. 7)
7.
Can you use the fprintf() to display the output on the screen?
Answer: Option
Explanation:
Do like this fprintf(stdout, "%s %d %f", str, i, a);
Discussion:
15 comments Page 2 of 2.
Shruti said:
1 decade ago
What does stdout refers here? And why it is used here?
Ambica said:
1 decade ago
Stdout is a standard output. It is used to print the output.
Rahul anantwar said:
1 decade ago
fprintf(fp, "abc....");
This statement writes the text in file pointed by fp pointer in d same way stdout is also a pointer that points to the output device hence.
fprintf(stdout, "abc");
This statement will print value on the screen or on any output device.
This statement writes the text in file pointed by fp pointer in d same way stdout is also a pointer that points to the output device hence.
fprintf(stdout, "abc");
This statement will print value on the screen or on any output device.
Kousi kan said:
1 decade ago
Actually I experimented, stdout used to print in output screen, fprintf used in file. Printf used in fun.
Bhavani said:
8 years ago
It is a destination for warning message.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers