Exemple #1
0
	int main()
	{
	  char s[100], t[100];
	  int i, j = 0;
	 
	  printf("Enter a string to delete vowels\n");
	  gets(s);
	 
	for(i = 0; s[i] != '\0'; i++) {
	#ifdef VAR == 1
		if(check_vowel(s[i]) == 0) 
	#endif
	{       //not a vowel
		  t[j] = s[i];
		  j++;
	}
	}
	 
	  t[j] = '\0';
	 
	  strcpy(s, t);    //We are changing initial string
	 
	  printf("String after deleting vowels: %s\n", s);
	 
	  return 0;
	}
Exemple #2
0
int main()
{
	char ch;
	printf("Input a character\n");
	scanf("%c", &ch);

	int n = check_vowel(ch);
	if (n == 1)
		printf("%c is a vowel.\n", ch);
	else
		printf("%c is NOT a vowel.\n", ch);

	return 0;
}
void check_sizzling(char* string, int size){
    int i;
    for(i=0; i<size; i++)
        if (string[i] == 'r' || string[i] == 'n'||string[i] == 'v')
            switch(check_vowel(string[i+1])){
            case 0:
                string[i+1] = 'a';
                break;
            case 1:
                string[i+1] = 'u';
                break;
            case 2:
                string[i+1] = 'e';
                break;
            default: break;

            }

}
Exemple #4
0
int check_vowel(char):

int main()
{
	char s[100], t[100];
	int i, j = 0;
	
	printf("Enter a string to delete vowels\n");
	gets(s);

	for ( i = 0 ; s[i] != '\0'; i++ ) {
	   if ( check_vowel(s[i]) == 0) {
	     t[j] = s[i];
		j++;
	   }
	}

	t[j] = '\0';
	strcpy(s, t);
	printf("String after deleting vowels: %s\n", s);
	
	return 0;
}