I
ivalki
Hi
How do i use the functions found in string.h to check if a letter is
vowel and a consonant ?
I have this code :
.........
const char vowel[5]="aeiou";
const char consonant[21]="bcdfghjklmnpqrstvwxyz";
while (position<endoffile)
{
read(file,&char_read,1);
if (strpbrk(vowel,char_read)!=NULL)
{
printf("\n vowel ");
}
else if (strpbrk(consonant,char_read)!=NULL)
{
printf("\n consonant ");
}
printf(" %c",char_read);
pozitia_curenta++;
}
}
and somehow the strpbrk does not work .. i also tried with several
functions but i haven't got this right so far
thanks
Vali.
How do i use the functions found in string.h to check if a letter is
vowel and a consonant ?
I have this code :
.........
const char vowel[5]="aeiou";
const char consonant[21]="bcdfghjklmnpqrstvwxyz";
while (position<endoffile)
{
read(file,&char_read,1);
if (strpbrk(vowel,char_read)!=NULL)
{
printf("\n vowel ");
}
else if (strpbrk(consonant,char_read)!=NULL)
{
printf("\n consonant ");
}
printf(" %c",char_read);
pozitia_curenta++;
}
}
and somehow the strpbrk does not work .. i also tried with several
functions but i haven't got this right so far
thanks
Vali.