Vidyalelo
C Programming · Q253

File Input Output

Programming · C Programming · question 253

Q253

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 int main(int argc, char **argv) char c = 'd'; putchar(c); printf(" %d ", argc);

A.
d 2 in myfile
B.
d 1 in myfile
Answer
C.
d in myfile and 1 in screen
D.
d in myfile and 2 in screen

Answer: Option B

Solution

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