Write a C program that finds the number of words starting with a user-entered letter in...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a C program that finds the number of words starting with a user-entered letter in sentence or sentences entered by user in the main function. The program should be able to work for both uppercase and lowercase letters, regardless of whether the letter it receives from the user. Use the following function to return the result and then print it as main: int countWord (const char *str, char let ); EXAMPLE OUTPUT 1: Enter a sentence: Look to my coming at first light on the 5th day. At dawn, look to the East. Enter a letter: 1 Number of words starting with 1 = 3 Write a C program that finds the number of words starting with a user-entered letter in sentence or sentences entered by user in the main function. The program should be able to work for both uppercase and lowercase letters, regardless of whether the letter it receives from the user. Use the following function to return the result and then print it as main: int countWord (const char *str, char let ); EXAMPLE OUTPUT 1: Enter a sentence: Look to my coming at first light on the 5th day. At dawn, look to the East. Enter a letter: 1 Number of words starting with 1 = 3
Expert Answer:
Answer rating: 100% (QA)
The image contains a programming exercise which describes the following task You are asked to write a C program that determines the number of words st... View the full answer
Related Book For
Systems Analysis And Design
ISBN: 978-1119496489
7th Edition
Authors: Alan Dennis, Barbara Wixom, Roberta M. Roth
Posted Date:
Students also viewed these programming questions
-
A tubular MF system treating an industrial wastewater is operated with an influent flow rate of 120 L/min, a flux of 45L/m2 h, and a recovery of 95%. Each membrane module contains 3.0m2 of membrane....
-
The Crazy Eddie fraud may appear smaller and gentler than the massive billion-dollar frauds exposed in recent times, such as Bernie Madoffs Ponzi scheme, frauds in the subprime mortgage market, the...
-
The annual membership fee at your health club is $750 a year and is expected to increase at 5% per year. A life membership is $7,500 and the discount rate is 12%. You either pay the annual membership...
-
Calculate the weight in newtons of a person who has a mass of 50 kg.
-
A match factory sells its goods in four district zones South, North, East and West. You have been given the particulars for January 2008 in respect of each zone mentioned as follows: Zones South...
-
According to the National Education Association (NEA), teachers generally spend more than 40 hours each week working on instructional duties. The following data show the number of hours worked per...
-
Prairie Park was started on April 1 by C. J. Amaro and associates. The following selected events and transactions occurred during April. Apr. 1 Stockholders invested $50,000 cash in the business in...
-
If you calculated the present value (PV) of $500 to be received at the end of 6 years using a required return (discount rate, interest rate) of 10% per year, compounded semiannually. you would get...
-
The 450-room Hotel Fernando is a four-star full-service hotel in San Petresco. It is highly regarded among both locals and tourists. Its service standards and ameni- ties complement its exquisite...
-
b) State whether the following statement is right or wrong. Justify your answer. "The derivative of the function f() = 1- e" + (e 1) sin(x) is zero at least once inside the interval (0, 1]."
-
Scott is 92 years old and has terminal cancer. His estate plan leaves $5 million to Siteman Cancer Center at his death via his last will and testament. You are his financial advisor. What do you...
-
Activity 2: Post journal entries and reconcile discrepancies This activity requires the student to post journal entries and reconcile discrepancies based on the information given in the case study....
-
Your client Jane would like to gift $25,000 to her college. Her assets include $100,000 of excess cash and $100,000 of Berkshire Hathaway stock that has a cost basis of $20,000. Jane's annual income...
-
Understanding valuations. Bank of Pacific Northwest (BPN) has current earnings per share of $10. The appropriate discount rate for the BPN stock is 20%. Suppose BPN distributes all of its earnings as...
-
On December 15, 2017 you enter a five-year "pay-fixed USD, receive-fixed EUR" currency swap, paying 2.0 % in USD and receiving 0.25% in EUR, on a face amount of 100 million, with annual reset dates....
-
The Mighty Silver Ball Company manufactures three kinds of pinball machines, each requiring a different manufacturing technique. The Super Deluxe Machine requires 17 hours of labor, 8 hours of...
-
What are the before image (BFIM) and after image (AFIM) of a data item? What is the difference between in-place updating and shadowing, with respect to their handling of BFIM and AFIM?
-
Assume that you are developing a new system for a local real estate agency. The agency wants to keep a database of its own property listings and also wants to have access to the citywide multiple...
-
Describe the four steps of business process management. Why do companies adopt BPM as a management strategy?
-
Create a structure chart based on the data flow diagrams (DFDs) that you created for the following exercises in Chapter 5: Question D Question E Question F Question G Question H
-
Describe the five financial statements and how they are prepared.
-
Presented below in alphabetical order are statement of financial position items for Feagler Gardening at December 31, 2025. Prepare a statement of financial position following the format of...
-
Presented below is selected information related to Tsui Repairs at December 31, 2025. Tsui reports financial information monthly (amounts in thousands). a. Determine the total assets of Tsui Repairs...
Study smarter with the SolutionInn App