Question: C - language please 1. Create a program that does the following, make sure you can complete this before moving to further questions, when compiling

 C - language please 1. Create a program that does the
C - language please

1. Create a program that does the following, make sure you can complete this before moving to further questions, when compiling add the -Ipthread argument, if you are using gcc use the -pthread argument. Creates two threads, the first uses a function hello world() which prints hello world, the second uses a function goodbye() which prints goodbye. Each function has a random sleep duration before printing the output - After running your program a few times you should notice that the order of hello world and goodbye being printed to the screen is not consistent, as each thread is executing independently. 2. Create a program the does the following. - Prompts the professor for five student's grades. Creates 5 threads, one for each student. Each thread uses a function called bellcurve(grade) which takes as an argument the grade and bellcurves it by multiplying the grade by 1.50 and then printing the bellcurved grade to the terminal. - The program must create the 5 threads and initialize them only after receiving all 5 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!