(Solved) : 3 2 Pts Output Following Program Receive Full Credit Answer Need Get Message Order Right I Q44087756 . . .
![3. [2 pts]What is the output of the following program? To receive full credit for your answer, you need to get the message or](https://media.cheggcdn.com/media/d0b/d0b2dcfd-d9b7-45bd-9343-79c0e5e67059/phpPG4WZ1.png)
3. [2 pts]What is the output of the following program? To receive full credit for your answer, you need to get the message order right. #include <pthread.h> #include <stdio.h> int value = 10; void* runner(void* param); int main(int argc, char* argv[]) { int pid; pthread_t tid; pid = fork(); if(!pid) { pthread_create(&tid, NULL, runner, NULL); pthread_join(tid, NULL); printf(“CHILD: value=%dn”, value); } else if (pid>0){ wait(NULL); printf(“PARENT: value = %dn”, value); void* runner (void* param) { value += 50; phread_exit(0); Show transcribed image text 3. [2 pts]What is the output of the following program? To receive full credit for your answer, you need to get the message order right. #include #include int value = 10; void* runner(void* param); int main(int argc, char* argv[]) { int pid; pthread_t tid; pid = fork(); if(!pid) { pthread_create(&tid, NULL, runner, NULL); pthread_join(tid, NULL); printf(“CHILD: value=%dn”, value); } else if (pid>0){ wait(NULL); printf(“PARENT: value = %dn”, value); void* runner (void* param) { value += 50; phread_exit(0);
Expert Answer
Answer to 3. [2 pts]What is the output of the following program? To receive full credit for your answer, you need to get the messa…
OR