Vidyalelo
Computer Science · all questions

Linux
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

996

Questions

9/50

Page

Pick an option on a question to see the right answer and solution.

Proc files are

Select an option to see the answer and solution.

Which command generates possible completions for string according to the and write it to standard output?

Select an option to see the answer and solution.

What is the output of this program?
#include<stdio.h>
#include<pthread.h>
 
void *fun_t(void *arg);
void *fun_t(void *arg)
{
    int ret;
    ret = pthread_exit("Bye");
    printf("%d\n",ret);
}
int main()
{
    pthread_t pt;
    void *res_t;
    if(pthread_create(&pt,NULL,fun_t,NULL) != 0)
        perror("pthread_create");
    if(pthread_join(pt,&res_t) != 0)
        perror("pthread_join");
    return 0;
}

Select an option to see the answer and solution.

Hidden files are

Select an option to see the answer and solution.

Which of the following exec call is a system call?

Select an option to see the answer and solution.

Which option of gcc enables compiler's all warning messages?

Select an option to see the answer and solution.

Which command on the command line provides the same output as this executable awk script?
#! /usr/bin/awk -f
BEGIN {
    print "example"
}

Select an option to see the answer and solution.

In linux kernel 2.4, we can have

Select an option to see the answer and solution.

For every successful login, which script will be executed?

Select an option to see the answer and solution.

wtmp and utmp files contain:

Select an option to see the answer and solution.

The kernel identifies the driver with its

Select an option to see the answer and solution.

What is the output of the following command for bash shell:
echo linux $0

Select an option to see the answer and solution.

Which one of the following is not contained in the kobject data structure?

Select an option to see the answer and solution.

Which command is used to close the vi editor?

Select an option to see the answer and solution.

The persistancy of a FIFO is

Select an option to see the answer and solution.

What is the output of this program?
#include<stdio.h>
#include<stdlib.h>
 
int main()
{
    char *ptr;
    ptr = (char *)malloc(sizeof(char)*8);
    ptr = "example";
    printf("%s\n",*ptr);
    return 0;
}

Select an option to see the answer and solution.

'kill %s' command will

Select an option to see the answer and solution.

In which directory every kernel module of the system is represented?

Select an option to see the answer and solution.

Command used to count number of character in a file is

Select an option to see the answer and solution.

What is the output of this program?
#include<stdio.h>
#include<fcntl.h>
 
int main()
{     
    int fd, count;
    fd = open("demo.c",O_RDONLY);
    count = write(fd,"Linux",5);
    if(count != 5)
        perror("write");
    return 0;
}

Select an option to see the answer and solution.