Question: Code in c language Write a program that accepts a phrase of unspecified length on the command line. For example: s/osproj2b Operating Systems Class The

Code in c language  Code in c language Write a program that accepts a phrase

Write a program that accepts a phrase of unspecified length on the command line. For example: s/osproj2b Operating Systems Class The main0 in this program has to create two threads running functions (vow and cons). The threads should take turns printing the respective words of the phrase supplied on the command line. The vow thread should print all the words that start with a vowel and the cons thread should print all words starting with a consonant. Note that the main thread (running main0) should not print anything itself, the output should be supplied by the threads that it creates. The order of words in the phrase should not be changed in the printout. Your program should work for any phrase of any reasonable length, not just the one given in the example. The output of your program should look similar to the following s /osproj2b Operating Systems Class vow: Operating cons: Systems cons: Class In this part you are "not allowed* to use synchronization primitives such as mutexes for thread coordination. You can use sched yieldO to relinquish control of the CPU. You will have to investigate some of the other pthread functions available to you for this project. Look for examples online

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!