Question: A. Consider this following simple function int array(int a[M][N]) { int i, j, c = 0; for (j= 0; j < N; j++) for
A. Consider this following simple function int array(int a[M][N]) { int i, j, c = 0; for (j= 0; j < N; j++) for (i = 0; i < M; i++) c+= alillil: return c; } Does this function have a good locality? Answer with showing the reference pattern.
Step by Step Solution
There are 3 Steps involved in it
The given function calculates the sum of all elements in a twodimensional array a of size M x N The ... View full answer
Get step-by-step solutions from verified subject matter experts
