Answers for "vowel letters in c"

C
0

vowel or consonant in c

// vowel or consonant check program
#include <stdio.h>
int main()
{
    char ch;
    ch = getchar();
    if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u')
    {
        printf("%c is Voweln", ch);
    }
    else
    {
        printf("%c is consonantn", ch);
    }
    return 0;
}
Posted by: Guest on July-08-2021
0

find the combination of vowel in a string c

#include <stdio.h>
#include <string.h>

void main ()
{
    char arr[100];
    int i, count = 0;

    printf("Enter array: ");
    gets(arr);

    printf("nThe combination of vowels are: ");

    for(i=0; i < strlen(arr); i++)
    {
        if((arr[i] == 'a' || arr[i] == 'e' || arr[i] == 'i' || arr[i] == 'o' || arr[i] == 'u')
           && (arr[i+1] == 'a' || arr[i+1] == 'e' || arr[i+1] == 'i' || arr[i+1] == 'o' || arr[i]+1 == 'u' ))
        {
            count++;
            printf(" %c%c ",arr[i], arr[i+1]);
        }


    }

    printf("nnNumber of occurrences of two vowels in succession is %d",count);
}
Posted by: Guest on June-23-2021

Code answers related to "C"

Browse Popular Code Answers by Language