Vidyalelo
Computer Science · Q658

Linux

Engineering and GATE · Computer Science · question 658

Q658

The hard limit of the file descriptors that can be opened by this process will become #include #include #include int main() struct rlimit limit; limit.rlim_cur = 10; limit.rlim_max = 20; if(setrlimit(RLIMIT_NOFILE,&limit) != 0) perror("setrlimit"); if(getrlimit(RLIMIT_NOFILE,&limit) != 0) perror("getrlimit"); printf("%lu ",limit.rlim_cur); printf("%lu ",limit.rlim_max); return 0;

A.
10
B.
20
Answer
C.
permisssion denied
D.
none of the mentioned

Answer: Option B

Solution

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