Examveda

What is the output of this program?
#include<stdio.h>
#include<unistd.h>
#include<fcntl.h>
 
int main()
{
    long int value;
    int fd;
    fd = open("/home/example/demo.c",O_RDONLY);
    value = fpathconf(fd,_PC_LINK_MAX);
    printf("%ld\n",value);
    return 0;
}

A. this program will print the maximum number of links to the file "demo.c"

B. this program will print nothing

C. this program will give an error

D. none of the mentioned

Answer: Option A


This Question Belongs to Computer Science >> Linux

Join The Discussion

Related Questions on Linux