Question: c++ 3. a. Rewrite the following function so that it returns the same result, but does not increment the variable ptr. Your new program must

3. a. Rewrite the following function so that it returns the same result, but does not increment the variable ptr. Your new program must not use any square brackets, but must use an integer variable to visit each double in the array. You may eliminate any unneeded variable. double computeAverage (const double* scores, int nScores) const double* ptr scores; double tot - 0; while (ptr - scores + nScores) tot +- *ptri ptr++; return totScores: b., Rewrite the following function so that it does not use any square brackets (not even in the parameter declarations) but does use the integer variable k. Do not use any of the
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
