Vidyalelo
Computer Science · Q785

Linux

Engineering and GATE · Computer Science · question 785

Q785

What is stored in logfile as per below mentioned code if we execute ./a.out > logfile? int main() int fd; close(1); fd = open(“logfile”,O_RDWR, 0744); write(fd, “Hello”, 5); printf(“World ”); return 0;

A.
Hello
B.
HelloWorld
Answer
C.
World
D.
None

Answer: Option B

Solution

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