I solved it, thank’s for all, I really appreciate your answers
#define n 3
int *p = &vec[0];
int count1 = 0;
for (i = 0; i < n; i++)
{
for (j = 0; j < n; j++)
{
if (*p <= vec[2])
{
if (*p == mat[i][j])
{
p++;
count1++;
i=0;
j=0;
}
}
}
}
if(count1 == 3) printf("ok");
12
solved check if array values in 2d array [closed]