Vidyalelo
Computer Science · Q196

Linux

Engineering and GATE · Computer Science · question 196

Q196

What is the output of this program? #include #include int main() int fd, fd2, ret; fd = open("hello.c",O_RDONLY); ret = close(fd2); printf("%d ",ret);

A.
0
B.
1
C.
-1
Answer
D.
none of the mentioned

Answer: Option C

Solution

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