I want to write a program in C using fork method to compute n factorial. this program (process) creates only one child. Each of the processes (parent and child) will compute approximately half of the complete sequence. Then the parent combines the results and print the final result.
- I've got an idea which is to divide the numbers between 1 to n into two intervals [1,n/2], [n/2,n] and assign the job of each interval to a process but i'm not so familiar with fork.
How can I pass data between the two processes?