I have attached the Lab referenced in this description. Please look at the notes and hints as requirements.
Write a C program that will start a race between 4 processes to get a number from the user inputs. The user will enter 4 numbers (1 to 4), the process that receives the first number (1) will be the winner and in the first place, processes afterward will get second, third and fourth place depending on the number they get from the user.
The program will start by using the fork() System call to create 4 processes, each process created is identified by a number from 1 to 4, this number indicates its creation sequence. For example, the first child process created get ID = 1.
After all, processes are created, the processes will start to request a number from the user. Each process will print the number it got from the user and also print its ID number. The parent does not participate in the race and waits for all child process to finish before it exits.
Notice: The numbers and the order of processes on your computer might be different.
Write a program that will administer a test for users. The questions and answers for the test are written in two separate files. The program will display a question to the user and accept user answers. The test will compare user input to answers. If the answer is correct, the program will add the corresponding points to the Total points for the user.
|10″How many states in the U.S.A ?””How many legs a cat has?””What is the best school in Erie ?””Who is the Tesla of our era ?”|
|50 1 4 1PSU 10Elon 100|
Try it now!
How it works?
Follow these simple steps to get your paper done
Place your order
Fill in the order form and provide all details of your assignment.
Proceed with the payment
Choose the payment system that suits you most.
Receive the final file
Once your paper is ready, we will email it to you.
No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.
No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.
Admission Essays & Business Writing Help
An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.
Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.
If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.