 <pre><code>#include &lt;stdio.h&gt; #include &lt;time.h&gt; #include &lt;stdlib.h&gt; #define ROW 3 #define COL 5 int main(){ int array[ROW][COL]; int practice_array; int i, row, col, max, min, sum, avg; srand(time(NULL)); for ( row = 0; row &lt; ROW; row = row + 1){ for ( col = 0; col &lt; COL; col = col +1){ array[row][col] = rand()%(10000+1); practice_array = array[row][col]; sum += practice_array; printf("The value in row %d col %d is %d\n",row, col,practice_array); } } avg = sum / (ROW*COL);//unused int *pv = &amp;array[0][0]; max = min = 0; for (i = 1; i &lt; ROW*COL; ++i){ if (pv[i] &gt; pv[max]) max =i; if (pv[i] &lt; pv[min]) min = i; } printf("The max value is %d in row %d, col %d\n", pv[max], max/COL, max%COL); printf("The min value is %d in row %d, col %d\n", pv[min], min/COL, min%COL); return 0; } </code></pre>