Create an Account

Already have account?

Forgot Your Password ?

Home / Questions / In C Write a program whose input is a character and a string, and whose output indicates the number

In C Write a program whose input is a character and a string, and whose output indicates the number

Write a program whose input is a character and a string, and whose output indicates the number of times the character appearsIn C

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: Monday the output is: 1 Ex: If the input is: Today is Monday z the output is: 0 Ex: If the input is: It s a sunny day the output is: 2 Case matters. n is different than N. Ex: If the input is: 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)

Apr 02 2020 View more View Less

Answer (Solved)

question Subscribe To Get Solution

Related Questions