subject

15.20 LAB: Count characters - functions 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. You may assume that the string does not contain spaces and will always contain less than 50 characters.

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, char* userString)

Note: This is a lab from a previous chapter that now requires the use of a function.
in C please

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 10:00, serenityharmon1
Hey i just logged on and one of the moderators deleted a bunch of my answers to questions, even though the answers were right and the people it doesn't make sense but if anyone wants to talk about anything just message me lol (this is super random lol)
Answers: 1
image
Computers and Technology, 24.06.2019 00:30, sethhdoty
Use the keyword strategy to remember the meaning of the following word. the meaning for the word has been provided. write your keyword and describe the picture you would create in your mind. obfuscate: to make something so confusing that it is difficult to understand.
Answers: 2
image
Computers and Technology, 25.06.2019 01:40, babydolltia28
The instantiation of an endpoint in a potential tcp connection is know as
Answers: 1
image
Computers and Technology, 25.06.2019 08:20, jake2124
With technology, information is sent to users based on their previous inquiries, interests, or specifications.
Answers: 2
You know the right answer?
15.20 LAB: Count characters - functions Write a program whose input is a character and a string, an...

Questions in other subjects:

Konu
Mathematics, 02.12.2020 03:00
Konu
Mathematics, 02.12.2020 03:00
Konu
Mathematics, 02.12.2020 03:00
Konu
Biology, 02.12.2020 03:00