Question: Write and run the program in UNIX/LINUX based C. The report must contain the code and the output followed by screen shot of the code

 Write and run the program in UNIX/LINUX based C. The report

Write and run the program in UNIX/LINUX based C. The report must contain the code and the output followed by screen shot of the code and the output. Write a main program that creates three thread, print their thread id of each thread. Also print the process id of the main program and prove that the process id of all the three thread are same. (3 marks) Write a program to demonstrate that all threads of the same process share the global data. (3 marks) Write a program to create four threads. Use two data's. First thread must add two data's. Second thread must subtract two data's. Third thread must multiply two data's. Fourth thread must divide two data's. (4 marks)

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!