Question: Please use C programming. Create a program that does the following. - Prompts the professor for ten students grades, - Creates ten threads, one for

Please use C programming.

Create a program that does the following.

- Prompts the professor for ten students grades,

- Creates ten threads, one for each student.

- Create a function class_total(grade) which adds the grade to a global variable total_grade using the operator += to increment total_grade

- You MUST use mutual exclusion when incrementing total_grade

- Print the results of total grade, it should be the correct sum of all ten grades.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!