finding in a two-dimensional array, the young matrix is in a two-dimensional array. Each row is sorted in ascending order from left to right. Each column is sorted in ascending order from top to bottom. Please complete a function, enter such an array and a number. Infer if the array contains this number # include <stdio.h> #define COL 4#define rol 4int yang (int (*p) [col], int num) {int i = 0;int J = Col-1;wh Ile (j+1) {int *q = & (P[i][j]), if (*q = = num) return 1;else if (*q < num) {p++;} else if (*q > num) {q--;j--;}} return-1;} int main () {int Arr[rol][col] = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, ten, one, and};p rintf ("%d\n", ya Ng (arr, 6));p rintf ("%d\n", Yang (arr.));p rintf ("%d\n", Yang (arr.));p rintf ("%d\n", Yang (arr, 1));p rintf ("%d\n", Yang (arr, +)); return 0;}
Find in a two-dimensional array of "C", the young matrix in a two-dimensional array, each row is sorted in ascending order from left to right, enter an array and a number, and infer whether the number is included in the array