Do you know that? 63% prerer the freelancer lifestyle insdead of full-time employment next

Write a C function that searches for value key in a a 2D array of size 6 by 5. The function should return true if found false otherwise?

bool SearchArray (int a[][3], int ROWS, int key)
 {
 bool found=false;
 for ( int r=0; r<ROWS; r++)
 for ( int c=0; c<3;c++)
 if (a[r][c]==key)
 {
 printf(" found at location [%d,%d] \n",r,c);
 return true;
 }
 return found;
 }