Examveda

What will be the output of the following C code?
#include <stdio.h>
int main()
{
    char buf[12];
    stderr = stdin;
    fscanf(stderr, "%s", buf);
    printf("%s\n", buf);
}

A. Compilation error

B. Undefined behaviour

C. Whatever user types

D. None of the mentioned

Answer: Option C


This Question Belongs to C Program >> File Input Output

Join The Discussion

Related Questions on File Input Output