>return true;
Whence comes true? Unless you defined it yourself I can only assume that you are mixing C and C++ (which is frowned upon on the C forum) or using C99 and not telling us (which is also frowned upon before C99 compilers are so rare).
>static int vowelIndex[5];
What reason do you have for declaring this static? The only reason I can see for this program is to get a zero fill, but that can be easily done like so without using static:
>fgets(buffer, 80, stdin);Code:int vowelIndex[5] = {0};
fgets is smart enough to read n - 1 characters and put a null character at the nth position. There's no need to subtract 1 from the array size when using it as the second argument. In fact, a better way to call fgets would be:
>fflush(stdin);Code:fgets(buffer, sizeof buffer, stdin);
Um...no. fflush is undefined for input streams.
>why dont you just use a switch statement?
It's a matter of style. You'll notice that the switch statement is often overly verbose compared to an equivalent if chain.