In C++.
The Catalan numbers are an integer sequence Cn that appears intree-enumeration problems. The first Catalan numbers for n = 1, 2,3, … are 1, 2, 5, 14, 42, 132, …. A formula generating Cnis:
Cn=(1÷(n+1))=(2n)!÷(n+1)!n!
Design two programs that communicate withshared memory using the Win32 API as outlined in Section 8.7.2. Theproducer process will generate the Catalan sequence and write it toa shared memory object. The consumer process willthen read and output the sequence from shared memory.
In this instance, the producer process will be passed an integerparameter on the command line specifying how many Catalan numbersto produce (for
OR
OR