12.
This program will print the . . . . . . . . string.
#include<stdio.h>
 
int main()
{
    int fd[2];
    char buff[11];
    if (pipe(fd) != 0)
        perror("pipe");
    write(fd[1],"Example",11);
    lseek(fd[0],0,3);
    read(fd[0],buff,11);
    printf("%s\n",buff);
    return 0;
}

13.
Which one of the following is not true?

15.
For the below mentioned code,
int main() 
{
     int fd;
     fd = open(“logfile”, O_CREAT|O_RDWR, 0600);
     lseek(fd, 5, SEEK_CUR);
     write(fd, “Hello”, 5);
     return 0;
}
What is the logfile size now if it's initially was 1024 bytes?

Read More Section(Linux)

Each Section contains maximum 100 MCQs question on Linux. To get more questions visit other sections.