subject

Write a program whose input is a character and a string, and whose output indicates the number of times the character appears in the string.

Ex: If the input is: n Monday,
the output is: 1
Ex: If the input is: z Today is Monday,
the output is: 0
Ex: If the input is: n It's a sunny day,
the output is: 2
Case matters. n is different than N.
Ex: If the input is: n Nobody,
the output is: 0

Your program must define and call the following function that returns the number of times the input character appears in the input string.

int CountCharacters(char userChar, string userString)

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:30
Kyle, a receptionist for a building supply company, recently won an award for saving his company money on their phone system. after being presented with kyle's research, the company changed the way in which it made long-distance phone calls and cut their expenses in this area by 75 percent. the new system the kyle's company most likely adopted was wired communications switching stations voip hdtv
Answers: 3
question
Computers and Technology, 23.06.2019 11:00
Describe three characteristics of at-risk drivers. a. b. c. describe three characteristics of safe drivers. a. b. c. describe three driver errors that could cause a collision. a. b. c. how will this information affect you as a driver now and in the future? (2-3 sentences)
Answers: 2
question
Computers and Technology, 23.06.2019 16:00
What is the biggest difference between section breaks and regular page breaks? section breaks are more difficult to add than page breaks. section breaks make it easier for you to view the document as an outline. section breaks allow you to have areas of the document with different formatting. section breaks are smaller than regular page breaks.
Answers: 2
question
Computers and Technology, 24.06.2019 01:30
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
You know the right answer?
Write a program whose input is a character and a string, and whose output indicates the number of ti...
Questions
question
Mathematics, 25.10.2019 04:43
Questions on the website: 13722359