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

What is the output of this program? #include<stdio.h> #include<stdlib.h> #include<unistd.h> int main() { pid_t child; int status; child = fork(); switch(child){ case -1 : perror("fork"); exit(1); case 0 : exit(2); break; default : wait(&status); printf("%d\n",WEXITSTATUS(status)); break; } return 0; }

Select the correct option to test your answer:

More Computer Science Engineering Questions

How the distance between two shapes can be defined? What command is used to set user and group quotas? The printer can be accessed using the predefined filename _____ The requirement for not repeating the instructions is referred to as the . . . . . . . . When configuring is a network interface cards without jumpers or plug and play, what is used to set the IRQs?