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
Get step-by-step solutions from verified subject matter experts
