Examveda

What will be the output of the following C code?
#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


This Question Belongs to C Program >> File Input Output

Join The Discussion

Related Questions on File Input Output