What is the output of this program? [code] #include<stdio.h> #include<sys/time.h> #include<sys/resource.h> int main() {

What is the output of this program?
Code:
   #include<stdio.h>
   #include<sys/time.h>
   #include<sys/resource.h>
   int main()
   {
       struct rlimit limit;
       if(getrlimit(RLIMIT_NOFILE,&limit) != 0)
           perror("getrlimit");
       printf("%lu\n",limit.rlim_max);
       return 0;
   }
A. this program will print the maximum numbers of the file descriptors that can be opened by a process
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
 

Tìm kiếm

Back
Top