Consider the following C++ function that is intended to count the number of negative values in an array. For example, if
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Consider the following C++ function that is intended to count the number of negative values in an array. For example, if
statement should be in the place of // Iterate to process the array? O for (int i = 0; i <= arraySize; i++) O for (int i = 0; i < arraySize; i++) O for (int i = 1; i <= arraySize; i++) O for (int i = -1; i < arraySize; i++)
Consider the following C++ function that is intended to count the number of negative values in an array. For example, if the array contains (1, 2, -1, 4, -3, -7) the count is three. int processArray (int mixedarray(), const int arraysize) { int count = 0; // Iterate { W compare count++; } return count; What