Vidyalelo
Computer Science · Q756

Linux

Engineering and GATE · Computer Science · question 756

Q756

What is the output of this program? #include #include #include int main() struct rlimit limit; if(getrlimit(RLIMIT_NOFILE,&limit) != 0) perror("getrlimit"); printf("%lu ",limit.rlim_max); return 0;

A.
this program will print the maximum numbers of the file descriptors that can be opened by a process
Answer
B.
this program will print the maximum numbers of the child processes of the current process
C.
this program will give an error because RLIMIT_NOFILE does not exist
D.
none of the mentioned

Answer: Option A

Solution

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