Write a c program to count number of vowels and consonants in a given string
Answers
Answered by
3
Answer:
C Program to Count the Number of Vowels, Consonants and so on
#include <stdio.h>
char line[150];
int vowels, consonant, digit, space;
vowels = consonant = digit = space = 0;
printf("Enter a line of string: ");
fgets(line, sizeof(line), stdin);
for (int i = 0; line[i] != '\0'; ++i) {
if (line[i] == 'a' || line[i] == 'e' || line[i] == 'i' ||
Answered by
0
Explanation:
Answer:
C Program to Count the Number of Vowels, Consonants and so on
#include <stdio.h>
char line[150];
int vowels, consonant, digit, space;
vowels = consonant = digit = space = 0;
printf("Enter a line of string: ");
fgets(line, sizeof(line), stdin);
for (int i = 0; line[i] != '\0'; ++i) {
if (line[i] == 'a' || line[i] == 'e' || line[i] == 'i' ||
Similar questions