Question: Task 1: a) Consider the following program: int main() { printf(Hello from initial pid %d , getpid()); pid_tp1 = fork(); assert(p1 >=0); pid_t p2 =

Task 1: a) Consider the following program: int main() { printf("Hello from initial pid %d ", getpid()); pid_tp1 = fork(); assert(p1 >=0); pid_t p2 = fork(); assert(p2 >= 0); printf("Hello from final pid %d ", getpid(); } How many lines of output would you expect to see when you run the program? b) Using the program shown, what will be the output of the ptintf function at LINE A. Explain your answers #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
