Trusted by millions of Kenyans
Study resources on Kenyaplex

Get ready-made curriculum aligned revision materials

Exam papers, notes, holiday assignments and topical questions – all aligned to the Kenyan curriculum.

Write a C function that computes that maximum of a specific row R in a 2D array of size 6 by 5.

Write a C function that computes that maximum of a specific row R in a
2D array of size 6 by 5.

Answers


Anthony
int MaxOfRow( int a[][5], int ROWS, int searched_row)
{ int max;
max=a[searched_row][0];
for (int c=0; c<5;c++)
if (a[searched_row][c]>max)
max=a[searched_row][c];
return max;
}
anmwat answered the question on March 5, 2019 at 10:33

Answer Attachments

Exams With Marking Schemes

Related Questions