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

11/50

Page

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

What is the default maximum number of processes that can exist in Linux?

Select an option to see the answer and solution.

Which command is used to identify file type?

Select an option to see the answer and solution.

Which one of the following is not true about this program?
#include<stdio.h>
#include<signal.h>
 
void response (int);
void response (int signo)
{
    printf("%s\n",sys_siglist[signo]);
    signal(SIGSEGV,SIG_IGN);
}
int main()
{
    signal (SIGSEGV,response);
    char *str;
    *str = 10;        
    return 0;
}

Select an option to see the answer and solution.

Advantage of FIFO over pipe is

Select an option to see the answer and solution.

What is the output of this program?
#! /usr/bin/awk -f
BEGIN {
    a=0
    do {
        print "example"
        a++
    } while (a<5)
}

Select an option to see the answer and solution.

A device class describes the . . . . . . . . type of device.

Select an option to see the answer and solution.

Syntax of any Unix command is:

Select an option to see the answer and solution.

Which one is used to select only one copy of the repeated lines?

Select an option to see the answer and solution.

Which one of the following is not system V IPC ?

Select an option to see the answer and solution.

The keyword 'local' is used

Select an option to see the answer and solution.

What is the output of this program?
#include<stdio.h>
#include<pthread.h>
#include<semaphore.h>
 
sem_t st;
void *fun_t(void *arg);
void *fun_t(void *arg)
{
    printf("Linux\n");
    pthread_exit("Bye");
}
int main()
{
    pthread_t pt;
    void *res_t;
    if(pthread_create(&pt,NULL,fun_t,NULL) == -1)
        perror("pthread_create");
    if(sem_init(&st,0,2) != 0)
        perror("sem_init");
    if(sem_wait(&st) != 0)
        perror("sem_wait");
    printf("Example\n");
    if(sem_wait(&st) != 0)
        perror("sem_wait");
    if(pthread_join(pt,&res_t) == -1)
        perror("pthread_join");
    if(sem_destroy(&st) != 0)
        perror("sem_destroy");
    return 0;
}

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)
{
    pthread_exit("Bye");    
}
int main()
{
    pthread_t pt;
    void *res_t;
    int ret;        
    ret = pthread_join(pt,&res_t);
    printf("%d\n",ret);
    return 0;
}

Select an option to see the answer and solution.

The files of /proc directory are

Select an option to see the answer and solution.

Host specific configuration files are installed in

Select an option to see the answer and solution.

What is the output of this program?
#include<stdio.h>
#include<sys/time.h>
#include<sys/resource.h>
 
int main()
{
    struct rlimit limit;
    if(getrlimit(RLIMIT_DATA,&limit) != 0)
        perror("getrlimit");
    printf("%lu\n",limit.rlim_max);
    return 0;
}

Select an option to see the answer and solution.

SVR4 was developed by

Select an option to see the answer and solution.

Which sytem call can be used by a user process to lock a memory so that it cannot be swapped out?

Select an option to see the answer and solution.

The 'logout' built in command is used to

Select an option to see the answer and solution.

The compiler converts

Select an option to see the answer and solution.

The contents of root filesystem is responsible to

Select an option to see the answer and solution.