Write a C program in the Linux/Unix MacOS environment? the program should using
ID: 674490 • Letter: W
Question
Write a C program in the Linux/Unix MacOS environment? the program should using POSIX threads (using Pthread library)- The program should create a shared memory region which contains and array of 100 integers (where each variable has the value in range 1000-4000). - The program should create two child processes. - The parent process will fill the array with a set of random integers (please use rand () function to generate random numbers) - The child process-1 will find the minimum of the numbers and store it in the minimum variable. - The child process-2 will find the average of the numbers from the array and store it in the maximum variable. - The parent process will wait for the child processes to complete and then print the minimum, maximum and the range (maximum-minimum) on the screen. - The program should using POSIX threads (using Pthread library)Explanation / Answer
Solution :