Write a function called isIthRowExactlyZero that takes a 2D array of real number
ID: 3545006 • Letter: W
Question
Write a function called isIthRowExactlyZero that takes a 2D array of real numbers, called M, and returns true if *all* the elements in the ith row are 0.0, and false if not. M has numRows rows and numCols columns, which are parameters along with M and i. NOTE: the value of i passed to the function is between 1 and R, inclusive. For example, if the caller wants to know if the first row of M is all zero, then i will have the value 1, not 0.
notes: Hint: think of this like a search, where you are searching for a value that is not 0.0.
bool isIthRowExactlyZero(int i, double M[MAXROWS][MAXCOLS], int numRows, int numCols)
{
}
Explanation / Answer
//code fragment-------------------------------------------------------------------
if(isIthRowExactlyZero(3,data,numRows, numCols))
printf("YES");
else
printf("NO")
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.