What will be the output of the following C code?
#include <stdio.h>
int main()
{
FILE *fp = stdout;
stderr = fp;
fprintf(stderr, "%s", "hello");
}
#include <stdio.h>
int main()
{
FILE *fp = stdout;
stderr = fp;
fprintf(stderr, "%s", "hello");
}
A. Compilation error
B. hello
C. Undefined behaviour
D. Depends on the standard
Answer: Option B
Join The Discussion