Question: c++ Return a pointer to the first negative number in a double array. A pointer to the first element in the array will be passed
c++
Return a pointer to the first negative number in a double array. A pointer to the first element in the array will be passed to the function along with the number of elements in the array in that order. Name the function firstNegD. If there are no negative numbers in the passed in array, the function must return nullptr. Note that a nullptr might be passed as an argument in which case nullptr must be returned.
#include
//put your function def here. Parameters will be the pointer to the double array, size_t for the size of the array in that order.
int main() { return 0; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
