#include <stdio.h>
#include <string.h>
#define LEN 3
int main(void)
{
char s1[LEN][5] = { "AB12" , "CD98" , "AB34" };
char s2[16] = "AB00";
for (int i = 0; i < LEN ;i++)
if (strncmp(s1[i], s2, 2) == 0)
printf("Found: %s\n", s1[i]);
return 0;
}
/*
run:
Found: AB12
Found: AB34
*/