Anonymous Anonymous - 7 days ago
71 0

No description

C

Lab 8c

int removeVowels(char arr[])
{
    // When you implement this function, the following return statement
    // will be removed/replaced by your code.
    int i;
    int j;
    int numVowels = 0;
    for (i = 0; arr[i] != NULL; i++)
    {
        if (arr[i] == 'a' || arr[i] == 'e' || arr[i] == 'i' || arr[i] == 'o' || arr[i] == 'u')
        {
            for(j = i; arr[j] != NULL; j++)
            {
                arr[j] = arr[j+1];
            }
            numVowels++;
        }
    }
    
    return numVowels;
}