Computers and Technology

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

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 10:50, latresyn
In 2009 to 2010, how many social network users were reported as being victims of online abuse? a. 1 in 10 b. 100% c.1 in 100 d. 50%
Answers: 2
image
Computers and Technology, 25.06.2019 04:10, asdasddas776
This might be a bit off-topic, but i'm having trouble with a certain arg made by game theory. if there are any theorists out there that wanna , it would be appreciated!
Answers: 2
image
Computers and Technology, 25.06.2019 10:00, lowealiyah6755
The default name for the small icon that represents a web site or page, and is displayed in the browsers, typically at the beginning of the url address field, is:
Answers: 1
image
Computers and Technology, 26.06.2019 03:50, babykate66
Sorry if it's too big but i made a pride month thumbnail u all like it? and if u do should i edit it?
Answers: 2
Do you know the correct answer?
15.20 LAB: Count characters - functions Write a program whose input is a character and a string, an...

Questions in other subjects:

Konu
History, 08.01.2020 23:31
Konu
Mathematics, 08.01.2020 23:31