Answers for "remove vowels from a string algorithm"

C
3

remove vowels in string

#include <stdio.h>
int check_vowel(char);
int main()
{
char s[100], t[100];
int c, d = 0;
gets(s);
for(c = 0; s[c] != ‘’; c++)
{
if(check_vowel(s[c]) == 0)
{
t[d] = s[c];
d++;
}
}
t[d] = ‘’;
strcpy(s, t);
printf(“%sn”, s);
return 0;
}
int check_vowel(char ch)
{
if (ch == ‘a’ || ch == ‘A’ || ch == ‘e’ || ch == ‘E’ || ch == ‘i’ || ch == ‘I’ || ch ==’o’ || ch==’O’ || ch == ‘u’ || ch == ‘U’)
return 1;
else
return 0;
}
Posted by: Guest on September-08-2020

Code answers related to "remove vowels from a string algorithm"

Code answers related to "C"

Browse Popular Code Answers by Language