Question: 1 3 ) ( 1 0 points ) Thread. Consider the following program ( main . c ) using the pthread library in C: #include

13)(10 points) Thread. Consider the following program (main.c) using the pthread library in C: #include #include #include void* f1(){ printf ("Nice day!
"); return NULL; } int main(){ pthread_t thl; pthread create(&thl, NULL, f1,NULL); return 0; a.(2 point) What is the command to compile the above program using the gcc compiler to an executable file named as main? Remember, you need to link the pthread library b.(3 points) What is the output of the above code? please explain c.(5 points) How to fix this problem? You need to add a line of code in the blank. Please explain why this works. What is the output of the code after filling in the blanks? #include #include #include void* f1(){ printf("Nice day!
"); return NULL; } int main(){ pthread_t thl; pthread_create(&th1, NULL, f1,NULL); return 0;

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 Programming Questions!