Question: Write a function to create a copy of an array of integers with any negative numbers removed, and a main function that provides an example
Write a function to create a copy of an array of integers with any negative numbers removed, and a main function that provides an example of calling your function. (e.g., main has an array with [7, -2, 5, -8] and needs a copy that just has [7, 5] without changing the original array).You can choose your own function name, parameters, return type, etc.Your function cannot modify the original arrayYou can not use square brackets in your function (main can use square brackets)You can not include any files
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
