Question: Write c++ code Write a C++ program that defines 2 functions for processing arrays using pointer based notation. 1 function should search through an array

Write c++ code
 Write c++ code Write a C++ program that defines 2 functions

Write a C++ program that defines 2 functions for processing arrays using pointer based notation. 1 function should search through an array and return the smallest integer element in the array. The other must search for and return the largest integer element. Here are the function headers to use: int findsmallest(cont int. intArray, const int size) int findLargest(cont int intArray, const int size) . Test the program from main by prompting the user for how big the array should be. Next, dynamically allocate an array of the requested size and initialize it with random intgers in the range [-1000, 1000]. Next, call the 2 functions, store their return values, and display the results in a user-friendly format Note: Do not use square bracket notation [ 1 in this program, except for when using the new operator. Use only pointer notation to manipulate the array. Note: whenever you use dynamically allocated memory, it is critical that you remember to de-allocate the memory so that it is returned back to the operating system. ssi gnmen How many integers do you want in the array? 5 Elementeis:613 lement 1 is: .810 nt 2 is 14 ment 3 is: 929 ement 4 is: 43 Bigsest integer: 929 est Integer 81 Press any, key to continue

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!