1- Compile and run the following program and answer the following: a. what do you think is the role of the inner loop in both if and the else blocks? b. Modify code in order to make the child process finish before the parent process starts #include <stdio.h> #include <sys/wait.h> /* contains prototype for wait */ #include <unistd.h> /* contains fork prototype */ #include <stdlib.h> #define ITR 100000 int main() { int i,j,pid; pid = fork(); if( pid == 0 ){ for ( i=0;i<20;i++){ for (j=0;j<ITR ;j++); printf("Child:%d\n",i); } } else{ for ( i=0;i<20;i++){ for (j=0;j<ITR;j++); printf("Parent:%d\n",i); } } } 2- Write a C program to create four processes parent and 3 children where they terminate in a sequence as follows: a. Parent process terminates at last b. First child terminates before parent and after second child. c. Second child terminates after last and before first child. d. Third child terminates first. The output should be similar to the following image where each process should print its ID and its parent ID
******* HIGH QUALITY and IMMEDIATE WORK *********
Hi, dear client!
I'm so happy to bid on this interesting project.
I have read your requirements carefully and feel confident to finish this task well in tight deadline.
I hope to discuss more detail.
Thank you
/**********************************/
https://www.freelancer.com/u/torrikress2
I already bid to your project, but it is deleted....
If the task deleted automatically, directly hire me, please.
https://www.freelancer.com/u/torrikress2
Thanks.
Dear Client.
I am Nikita
Thank you for your posting.
I've just read your description and guarantee 100% success on your job.
Let's discuss about budget and deadline on private chat.
Looking forward to hearing from you soon.
Thanks
Hi , I am C/C++ expert , I can do this job so perfectly , just let me do it .
CONTACT ME PLEASE ! ( I'm who you was talking with !!!!!!!!!!!!!! , let me start the work !!!)
100% satisfaction guarantee
100% satisfaction priority
Hello, ⭐️⭐️I’m Ready to start Immediately⭐️⭐️
I have read your requirements carefully and I am very interested in your project.
If hired by you I will be responsible to complete the task within the stipulated time frame and with confidence.
Will be waiting for your kind response.
Best Regards!
Adeeb Ibrhaim