Vidyalelo
C Programming · Q209

File Input Output

Programming · C Programming · question 209

Q209

What will be the output of the following C code if following commands are used to run and if myfile does not exist? gcc -o test 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.
Depends on the system
D.
Depends on the standard

Answer: Option B

Solution

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