(Memory Management): Write a program to simulate Memory Management for First-Fit.a.Define 10 element array and mark as 0 (0 means free memory)b.Repeat the following steps until exitc.Display a menu to ask user to create, delete, or exitFor creation:Assign a process number (staring 1 and increase by 1 for each creation)Generate a random number between 1 and 4 (means the memory needed by this process)Assign the process number to required memory location by using First-Fit (means that memory location used by that process)Display the contents of the arrayFor deletion:Ask user to input process numberIf the process exists, delete the memory by assign 0 to those location and display the contents of the arrayIf the process does not exist, display error message.