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 using namespace std;

//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

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!