Vidyalelo
C Programming · Q45

File Input Output

Programming · C Programming · question 45

Q45

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 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
Answer
D.
Undefined behaviour

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board