The obvious solution for your goal is to use the standard library's strstr function.
Since you are not allowed to use the string library, you should write your own version of strstr and use that.
Here is a simple yet conforming implementation:
char *my_strstr(const char *s1, const char *s2) {
for (;;) {
for (size_t i = 0;; i++) {
if (s2[i] == '\0')
return (char *)s1;
if (s1[i] != s2[i])
break;
}
if (*s1++ == '\0')
return NULL;
}
}
You then use this function this way:
if (my_strstr(input_array, search_array)) {
printf("string was found\n");
} else {
printf("string was not found\n");
}