#include <stdio.h>

int isVowel(char ch)
{
    if (ch >= 'A' && ch <= 'Z')
        ch = (ch - 'A') + 'a';
    return (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u');
} 

int removeVowels(char *s)
{
    int removed = 0;

    if (s)
    {
        while (*s != '\0')
        {
            char ch = *s++;

            if (isVowel(ch) && (*s == ch))
            {
                char *src = s, *dst = s;

                do {
                   ++src;
                   ++removed;
                }
				while (*src == ch);

				while (*src != '\0') {
					*dst++ = *src++;
				}

				*dst = '\0';
            }
        }
    }

    return removed;
}

int main()
{
	char s[] = "Estaa e umaa string coom duuuplicadoos";
	int removed = removeVowels(s);
	printf("%s\n# Removed: %d", s, removed);
	return 0;
}