const char *haystack[] = {
  , , , , , , ,
  , , , NULL
};

int search_needle(const char *needle, const char **hs)
{
  int i = 0;
  while( hs[i] != NULL ) {
    if ( strcmp(hs[i], needle) == 0 ) return i;
    i++;
  }
  return -1;
}

int search_last_needle(const char *needle, const char **hs)
{
  int i, last=0;
  i = last = search_needle(needle, hs);
  if ( last < 0 ) return -1;
  while( hs[++i] != NULL ) {
    if ( strcmp(needle, hs[i]) == 0 ) {
      last = i;
    }
  }
  return last;
}

int main()
{
  printf(, search_needle(, haystack));
  if ( search_needle(, haystack) == -1 )
    printf();
  printf(, search_needle(, haystack));
  printf(, search_last_needle(, haystack));
  return 0;
}