M
Mohan
Hi Friends,
The following code is working fine and printing the string "Mohan S".
#include<stdio.h>
int main()
{
FILE *fp;
fp=stdout;
fprintf(fp,"%s","Mohan S");
}
My doubt is how it is possible to assign a standard output stream to a
file stream....Why it didn't throw any error;instead its running
fine...
Can anyone give me clear explanations... ?
Thanks in advance...
Mohan Shanmugam
The following code is working fine and printing the string "Mohan S".
#include<stdio.h>
int main()
{
FILE *fp;
fp=stdout;
fprintf(fp,"%s","Mohan S");
}
My doubt is how it is possible to assign a standard output stream to a
file stream....Why it didn't throw any error;instead its running
fine...
Can anyone give me clear explanations... ?
Thanks in advance...
Mohan Shanmugam