question archive Make a c program, Declare four arrays ia1,ia2,ia3 and ia4 of 100 elements each and initialize the elements with random integers between (10 and 20) in the main thread
Subject:Computer SciencePrice: Bought3
Make a c program, Declare four arrays ia1,ia2,ia3 and ia4 of 100 elements each and initialize the elements with random integers between (10 and 20) in the main thread. ?
Make three thread functions sum_1, sum_2, sum_3 and sum_4
o Make four threads in main and pass arrays ia1,ia2,ia3 and ia4 to sum_1, sum_2, sum_3 and sum_4 respectively.
o Perform the addition of the array elements in the respective threads and return the results to the main thread that uses sum1, sum2,sum3 and sum4 for return values.
o Print sum= sum1+sum2+sum3+sum3