Question: Write a program in C which asks the user to enter a string (max 100 characters) and then prints the number of vowels and consonants
Write a program in C which asks the user to enter a string (max 100 characters) and then prints the number of vowels and consonants in the string. The program must use pointers to achieve this.
The code required to read a string is:
printf("Enter any string (max 100 characters with no spaces): ");
fgets(str, 100, stdin); //stored the user input ins str which is an array.
Some sample output: Enter a string (max 100 characters with no spaces): Computer
Number of Vowels in String: 3
Number of Consonants in String: 5
Extra: Also write a function which prints all the characters in upper case.
Step by Step Solution
There are 3 Steps involved in it
To solve this problem we will create a C program that does t... View full answer
Get step-by-step solutions from verified subject matter experts
