title: How can we get vowel substring from a given string
body: <p>I want to get all vowel substrings from the given string.
  Given string is '<strong>auiouxaeibaou</strong>', get substrings from the given string like [<strong>auiou</strong>,<strong>aei</strong>,<strong>aou</strong>].</p>
  
  <p>Here I tried something like this, but not getting the exact output. </p>
  
  <pre><code>bool isVowel(char c) {
      return (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u');
  }
  
  void substr(char str[], int low, int high)
  {
      printf("%.*s \n\n ", high-low+1, (str+low));
  }
  
  int main(int argc, const char *argv[]) {
  
      char str[] = "aeixae";
  
      int length = strlen(str);
  
      int start_index = 0, end_index = 0;
  
      for (int x=0; x&lt;length; x++) {
          char c  = str[x];
          if (isVowel(c) == false) {
              end_index = x;
              substr(str, start_index, end_index - 1 );
              start_index = end_index + 1;
          }
  
      }
      return 0;
  }
  </code></pre>