The numNegatives variable counts the number of negative valu…
The numNegatives variable counts the number of negative values in the array userVals. What should numNegatives be initialized to, to make sure it has the correct value after the for loop? int userVals[20];int i;int numNegatives = /* What should this be? */ ; for (i = 0; i < 20; ++i) { if (userValues[i] < 0) { numNegatives = numNegatives + 1; }}
Read Details