Extracted text: Use the following array of 8 integers to answer the following questions, {7,3,7,7,7,5,2,7} a) You are required to write a user defined C++ function that will receive the above array as a parameter, and will loop through it and re-arrange it into the following final output {5,3,2,7,7,7,7,7} and display it from the main function of your program. The idea is to position all values equal to 7 in the array to come after the other values not equal to 7. The order of the other values i.e 5, 3 and 2 does not matter as long as they appear positioned before all 7s as illustrated in the hint below:
Extracted text: does not matter as long as they appear positioned before all 7s as illustrated in the hint below: Initial array: {7,3,7,7,7,5,2,7} NumbertoMove = 7 %3D Final Array: {5,3,2,7,7,7,7,7} b) Write another separate function in the same program above that takes the array above,{7,3,7,7,7,5,2,7} and loops through the elements calculating the sum and product of all the elements and displays them.