Respuesta :

Answer:

See comments for line by line explanation (Lines that begins with // are comments)

The function written in C, is as follows:

//The function starts here

int check(x,y,n)

{

//This if condition checks if x and y are within range of 0 to n - 1

if((x>=0 && x<=n-1) && (y>=0 && y<=n-1))

{

//If the if conditional statement is true, the function returns 1

 return 1;

}

else

{

//If the if conditional statement is false, the function returns 0

 return 0;

}

//The if condition ends here

}

//The function ends here

Explanation: