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

21/50

Page

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

Which one of the following command saves the command history of GDB in a file?

Select an option to see the answer and solution.

When a target of makefile fails to execute

Select an option to see the answer and solution.

Which command sets the number for all lines?

Select an option to see the answer and solution.

Which of these commands will set the permissions on file textfile to read and write for the owner, read for the group, and nothing for everyone else?

Select an option to see the answer and solution.

Which one of the following is not true?

Select an option to see the answer and solution.

Which of the following commands will allow the user to search contents of a file for a particular pattern

Select an option to see the answer and solution.

Daemon process is a?

Select an option to see the answer and solution.

What is the output of this program?
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<sys/types.h>
#include<sys/ipc.h>
#include<sys/msg.h>
 
struct data_st{
    long int id;
    char buff[11];
};
int main()
{
    int m_id;
    struct data_st data1, data2;
    m_id = msgget((key_t)181,0666|IPC_CREAT);
    if(m_id == -1)
        perror("msgget");
    data1.id = 1;
    strcpy(data1.buff,"Example");
    if(msgsnd(m_id,&data1,11,0) == -1)
        perror("msgsnd");
    if(msgctl(m_id,IPC_RMID,0) != 0)
        perror("msgctl");
    if(msgrcv(m_id,&data2,11,1,0) == -1)
        perror("msgrcv");
    printf("%s\n",data2.buff);
    return 0;
}

Select an option to see the answer and solution.

Which of the following umask settings doesn't allow execute permission to be set by default on directory files

Select an option to see the answer and solution.

The directories of /sys directory

Select an option to see the answer and solution.

Which built-in function returns the arctangent of a/b in radians.

Select an option to see the answer and solution.

The command line options of gcc can also be read from a file with

Select an option to see the answer and solution.

The command "show commands" of GDB

Select an option to see the answer and solution.

shared memory can be used for?

Select an option to see the answer and solution.

What will print as the SIGINT signal hits the running process of this program?
#include<stdio.h>
#include<stdlib.h>
#include<signal.h>
 
void response (int);
void response (int sig_no)
{
    printf("%s",sys_siglist[sig_no]);
}
int main()
{
    signal(SIGINT,response);
    while(1){
        printf("Example\n");
        sleep(1);
    }
    return 0;
}

Select an option to see the answer and solution.

Which option of gcc inhibit all warning messages?

Select an option to see the answer and solution.

The command 'enable -n '

Select an option to see the answer and solution.

Which variable contains last background job process id

Select an option to see the answer and solution.

The file /proc version shows the version of . . . . . . . . used in the system.

Select an option to see the answer and solution.

Which among the following allows fast file system recovery?

Select an option to see the answer and solution.