Home / MCQ Bank / Computer Science Engineering
Computer Science Engineering Linux Difficulty: Medium

What is the output of this program? #include<stdio.h> #include<signal.h> #include<stdlib.h> void response (int); void response (int sig_no) { printf("%s\n",sys_siglist[sig_no]); printf("This is singal handler\n"); } int main() { pid_t child; int status; child = fork(); switch (child){ case -1 : perror("fork"); exit (1); case 0 : kill(getppid(),SIGKILL); printf("I am an orphan process because my parent has been killed by me\n"); printf("Handler failed\n"); break; default : signal(SIGKILL,response); wait(&status); printf("The parent process is still alive\n"); break; } return 0; }

Select the correct option to test your answer:

More Computer Science Engineering Questions

Which type of memory is used to hold BIOS firmware that initializes hardware during booting? Which of the following service is provided by Google for online storage? Which of the following "laws" is Asimov's first and most important law of robotics? The instructions like MOV or ADD are called as . . . . . . . . What is the phase shift between total current and voltage in the circuit of a 100 ohm resistor connected in parallel with a capacitor that has a reactance of 100 ohm