subject

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.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:30
Felicia wants to become a head surgeon by december 2013. she designs the career milestones that she would need to complete her goal. by june 2013, she was not licensed. which best describes what she should do?
Answers: 2
question
Computers and Technology, 22.06.2019 07:00
Robots with telescoping arms are sometimes used to perform tasks (e.g., welding or placing screws) where access may be difficult for other robotic types. during a test run, a robot arm is programmed to extend according to the relationship r = 3 + 0.5cos(4θ) and the arm rotates according to the relationship θ=−π4t2+πt , where r is in feet, θ is in radians, and t is in seconds. use a computer program to plot the path of tip a in x and y coordinates for 0 ≤ t ≤ 4s.
Answers: 2
question
Computers and Technology, 23.06.2019 02:50
There’s only one game mode that stars with the letter ‘e’ in cs: go. which of the options below is it?
Answers: 1
question
Computers and Technology, 23.06.2019 06:10
The head restraint should be adjusted so that it reaches a.the top of your ears b.the base of your skull c.the top of the head
Answers: 1
You know the right answer?
Write a C or C program A6p2.c[pp] that accepts one command line argument which is an integer n betwe...
Questions
question
History, 06.09.2020 01:01
question
Mathematics, 06.09.2020 01:01
question
Mathematics, 06.09.2020 01:01
question
Mathematics, 06.09.2020 01:01
question
English, 06.09.2020 01:01
question
English, 06.09.2020 01:01
Questions on the website: 13722359