Question: Character Functions. Many areas of engineering use problem solutions in which we search for a specific pattern of information in a signal. The following problems

 Character Functions. Many areas of engineering use problem solutions in which

Character Functions. Many areas of engineering use problem solutions in which we search for a specific pattern of information in a signal. The following problems develop a set of functions for this purpose 1. Write a function that receives a pointer to a character string and a character. The function should return the number of times that the character occurred in the string. Assume that the function has the following prototype statement: int charcnt(char *ptr,char c); 2. Write a function that receives a pointer to a character string and returns the number of repeated characters that occur in the string. For example, the string "Mississippi" has three repeated characters. Do not count repeated blanks in the string. If a character occurs more than two times, it should still only count as one repeated character; thus,"hisssss" would have only one repeated character. Assume that the function has the following prototype statement int repeat char *ptr)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!