Question: Please program both parts of this question in C programming. Part 1 In the main function, prompt the user for a phrase or a word.
Part 1 In the main function, prompt the user for a phrase or a word. Then, call function countCharacterTypes(phrase), passing the entered phrase or word as its parameter. Declare the function as void countcharacterTypes(char str[]). Using functions from the character-handling library, count the following character types in the phrase or word entered and print the counts to the screen. 1) Length of the phrase 2) Number of alphabets 3) Number of lowercase letters 4) Number of uppercase letters 5) Number of vowels 6) Number of consonants 7) Number of punctuations 8) Number of spaces 9) Number of digits Part-2 In the main function, after calling function countcharacterTypes call another function string Manipulation defined as void stringManipulation(void). Inside the function, declare the following strings exactly. You can copy them into your program. char 1120) "OIHO" s2120) a "SAXET" s3120) a "AIGROEG"; char s4120] "SUBMULOC s5120] a "NITSUA s6120) "ATNALTA Here, strings s1, s2, s3 represent the names of states, whereas s4, s5, s6 represent the names of the capitals of s1, s2 and s3, respectively. Note that the states and the capitals are in reverse order and in uppercase
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
