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

35/50

Page

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

In linux kernel 2.1, the minor numbers were used to

Select an option to see the answer and solution.

Sysfs does not contains

Select an option to see the answer and solution.

Which character to use to escape meaning of special characters in search operations?

Select an option to see the answer and solution.

nohup is used to

Select an option to see the answer and solution.

The a.out file is in the

Select an option to see the answer and solution.

Any file or directory present in the . . . . . . . . directory may not be reserved between the invocation of the program.

Select an option to see the answer and solution.

Code snippets
str1=”45678\n”
str2=”123\n”
f1 = fopen(file1,RDWR,RWX)
f2 = fopen(file1,RDWR,RWX)
write(f1,str1,len_str1)
write(f2,str2,len_str2)
 
o/p:

Select an option to see the answer and solution.

The system calls in UNIX is written using which language

Select an option to see the answer and solution.

? Specifies

Select an option to see the answer and solution.

Parameters can be passed to a function

Select an option to see the answer and solution.

The library contains the

Select an option to see the answer and solution.

In GDB breakpoints can be skipped by the command

Select an option to see the answer and solution.

What is the meaning of $ sign in awk programming?

Select an option to see the answer and solution.

What will be printed for the command below?
$ grep –c “^echo” abc

Select an option to see the answer and solution.

What is the output of the below code?
void sig_handler ( int signum) {
    printf(“Handled the signal\n”);
}
 
int main() {
    int pid;
    signal (SIGKILL, sig_handler);
    pid = fork();
    if (pid==0) {
        kill(getppid(), SIGKILL);
        exit(0);
    } else {
        sleep(20);
    }
    return 0;
}

Select an option to see the answer and solution.

Which option of the gcc is used to warn is padding is included in structure?

Select an option to see the answer and solution.

What is the output of this program?
#include<stdio.h>
#include<signal.h>
 
void response (int);
void response (int sig_no)
{
    printf("%s\n",sys_siglist[sig_no]);
}
int main()
{
    pid_t child;
    int status;
    child = fork();        
    switch(child){
        case -1:
            perror("fork");
        case 0:
            break;               
        default :
            signal(SIGCHLD,response);
            wait(&status);
            break;
    }
}

Select an option to see the answer and solution.

Fork returns . . . . . . . . to parent process on success

Select an option to see the answer and solution.

cmd 2>&1 > abc will

Select an option to see the answer and solution.

This program will allocate the memory of . . . . . . . . bytes for pointer "ptr".
#include<stdio.h>
#include<stdlib.h>
 
int main()
{
    int *ptr;
    ptr = (int*)malloc(sizeof(int)*4);
    ptr = realloc(ptr,sizeof(int)*2);
    return 0;
}

Select an option to see the answer and solution.