STARTING OUT WITH C++FROM CONTROL STRU
STARTING OUT WITH C++FROM CONTROL STRU
18th Edition
ISBN: 9781323815458
Author: GADDIS
Publisher: PEARSON
Question
Book Icon
Chapter 10, Problem 6PC
Program Plan Intro

Vowels and Consonants

Program plan:

  • Include the required header files to the program.
  • Declare function prototype which is used in the program.
  • Define the “main()” function.
    • Declare the required variables.
    • Get the input c-string from the user and display the menu.
      • Validate the user option.
    • Switch-case statement is used to call the function according to user option and display the result.
  • Define the “vowels” function.
    • Declare the variables.
    • The “while” loop is used to count the total number of vowels in the sentence.
    • Return the result to the main function.
  • Define the “consonants” function.
    • Declare the variables.
    • The “while” loop is used to count the total number of consonants in the sentence.
    • Return the result to the main function.

Blurred answer
Students have asked these similar questions
Question Mo Write a function that accepts a pointer to a C-string as its argument. The function should count the number of times the character ‘G’ or the character ‘H’ occurs in the argument and return that number. Full explain this question and text typing work only     We should answer our question within 2 hours takes more time then we will reduce Rating Dont ignore this line
Computer Science ****Please Write a program CODE in C 2. Write a function which takes a string of any length and returns the number of times the letter a appears in the string. Write the main program, which prompts the user to enter a sentence (up to 100 characters) and uses the function to find the number of times a occurs in the sentence. Print the result.
Complete the check_character() function which has 2 parameters: A string, and a specified index. The function checks the character at the specified index of the string parameter, and returns a string based on the type of character at that location indicating if the character is a letter, digit, whitespace, or unknown character. Ex: The function calls below with the given arguments will return the following strings: check_character('happy birthday', 2) returns "Character 'p' is a letter"check_character('happy birthday', 5) returns "Character ' ' is a white space"check_character('happy birthday 2 you', 15) returns "Character '2' is a digit"check_character('happy birthday!', 14) returns "Character '!' is unknown"    use python please def check_character(word, index):    # Type your code here.  if __name__ == '__main__':     print(check_character('happy birthday', 2))    print(check_character('happy birthday', 5))    print(check_character('happy birthday 2 you', 15))…

Chapter 10 Solutions

STARTING OUT WITH C++FROM CONTROL STRU

Ch. 10.5 - Write a short description of each of the following...Ch. 10.5 - Write a statement that will convert the string 10...Ch. 10.5 - Prob. 10.13CPCh. 10.5 - Write a statement that will convert the string...Ch. 10.5 - Write a statement that will convert the integer...Ch. 10.6 - Prob. 10.16CPCh. 10 - Prob. 1RQECh. 10 - Prob. 2RQECh. 10 - Prob. 3RQECh. 10 - Prob. 4RQECh. 10 - Prob. 5RQECh. 10 - Prob. 6RQECh. 10 - Prob. 7RQECh. 10 - Prob. 8RQECh. 10 - Prob. 9RQECh. 10 - Prob. 10RQECh. 10 - The __________ function returns true if the...Ch. 10 - Prob. 12RQECh. 10 - Prob. 13RQECh. 10 - The __________ function returns the lowercase...Ch. 10 - The _________ file must be included in a program...Ch. 10 - Prob. 16RQECh. 10 - Prob. 17RQECh. 10 - Prob. 18RQECh. 10 - Prob. 19RQECh. 10 - Prob. 20RQECh. 10 - Prob. 21RQECh. 10 - Prob. 22RQECh. 10 - Prob. 23RQECh. 10 - Prob. 24RQECh. 10 - The ________ function returns the value of a...Ch. 10 - Prob. 26RQECh. 10 - The following if statement determines whether...Ch. 10 - Assume input is a char array holding a C-string....Ch. 10 - Look at the following array definition: char...Ch. 10 - Prob. 30RQECh. 10 - Write a function that accepts a pointer to a...Ch. 10 - Prob. 32RQECh. 10 - Prob. 33RQECh. 10 - T F If touppers argument is already uppercase, it...Ch. 10 - T F If tolowers argument is already lowercase, it...Ch. 10 - T F The strlen function returns the size of the...Ch. 10 - Prob. 37RQECh. 10 - T F C-string-handling functions accept as...Ch. 10 - T F The strcat function checks to make sure the...Ch. 10 - Prob. 40RQECh. 10 - T F The strcpy function performs no bounds...Ch. 10 - T F There is no difference between 847 and 847.Ch. 10 - Prob. 43RQECh. 10 - char numeric[5]; int x = 123; numeri c = atoi(x);Ch. 10 - char string1[] = "Billy"; char string2[] = " Bob...Ch. 10 - Prob. 46RQECh. 10 - Prob. 1PCCh. 10 - Prob. 2PCCh. 10 - Prob. 3PCCh. 10 - Average Number of Letters Modify the program you...Ch. 10 - Prob. 5PCCh. 10 - Prob. 6PCCh. 10 - Name Arranger Write a program that asks for the...Ch. 10 - Prob. 8PCCh. 10 - Prob. 9PCCh. 10 - Prob. 10PCCh. 10 - Prob. 11PCCh. 10 - Password Verifier Imagine you are developing a...Ch. 10 - Prob. 13PCCh. 10 - Word Separator Write a program that accepts as...Ch. 10 - Character Analysis If you have downloaded this...Ch. 10 - Prob. 16PCCh. 10 - Prob. 17PCCh. 10 - Prob. 18PCCh. 10 - Check Writer Write a program that displays a...
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning