Computers and Technology

g Write a C or C program A6p2.c[pp] that accepts one command line argument which is an integer n between 2 and 4 inclusive. Generate 60 random integers between 1 and 39 inclusive and store them in a 5 by 12 two dimensional integer array (e. g.,int a[5][12];). Use pthread to create n threads to convert all 60 array elements modulo 11 (i. e. take the remainder after division by 11) in place. You should divide this update task among the n threads as evenly as possible. Print the array both before and after the update separately as 5 by 12 matrices. Hint: it is dangerous to have code to print messages in your thread function(s). Note: if you do not use pthread to divide the update task among the threads, you may get zero points. A sample run of the programs in 1 and 2 is shown below. You do NOT need to submit screen shots. Instead submit your source files.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 19:30, tfaulk2884
Singing in the rain: this first part of the film shows the early history of motion picture. how accurate do you think the portrayal of the early motion picture industry is? why? is historical accuracy important in films and theater productions? explain.
Answers: 1
image
Computers and Technology, 22.06.2019 22:30, Metlife
You are new to microsoft certification and want to start out by getting a certification geared around windows 8. what microsoft certification should you pursue?
Answers: 1
image
Computers and Technology, 23.06.2019 21:40, minnie7760
Draw the resistor’s voltage and current phasors at t=15ms. draw the vectors with their tails at the origin. the orientation of your vectors will be graded. the exact length of your vectors will not be graded.
Answers: 2
image
Computers and Technology, 25.06.2019 02:00, doug26
What type of multimedia is a game cd? game cds are examples of multimedia
Answers: 1
Do you know the correct answer?
g Write a C or C program A6p2.c[pp] that accepts one command line argument which is an integer n bet...

Questions in other subjects: