Examveda

What will be the output of the following C code if following commands are used to run (considering myfile exists)?
gcc -otest test.c
./test < myfile

#include <stdio.h>
int main()
{
    char c = 'd';
    putchar(c);
}

A. Compile time error (after first command)

B. d in the myfile file

C. d on the screen

D. Undefined behaviour

Answer: Option C


This Question Belongs to C Program >> File Input Output

Join The Discussion

Related Questions on File Input Output