93.
What is the meaning of $ sign in awk programming?

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

95.
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;
}

97.
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;
    }
}

100.
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;
}

Read More Section(Linux)

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