[10 points] Using the code examples provided, write a program that will fill an array with data using two processes.
- Set up a shared memory segment of 20 characters.
- Create a child process which will:
- fill all odd locations (1, 3, 5, ... ) in the array with the letter 'c'.
- exit
- The parent should:
- fill all even locations (0, 2, ...) in the array with the letter 'p'
- wait for the child to exit
- print the contents of the array (index:value, one per line)
0:p
1:c
...
19:c
- clean up shared memory
- exit
I intend you to use the example provided in class, it should be an easy adaptation.
Place the source code for this program in Homework 3: Code