Question: Create parent and child process in C using below code. What are the values of Child process and parent Process? #include #include #include int value

  1. Create parent and child process in C using below code.

What are the values of Child process and parent Process?

 Create parent and child process in C using below code. What

#include #include #include int value = 5; int value2; int main() int pid; pid = fork(); if (pid == 0) { /* child process */ value2 = value +15; printf("CHILD process value = %d ", value2 ); return 0; } else if (pid > 0) { /* parent process */ wait(NULL); printf("PARENT process value = %d", value); return 0; } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!