write a function that receives a pointer to a character string andreturns the nu
ID: 3611048 • Letter: W
Question
write a function that receives a pointer to a character string andreturns the number of repeated characters that occur in the string.For example, the string "Mississippi" has three repeatedcharacters. Do not count repeated blanks in the string. If acharacter occurs more than two times, it should still only count asone repeated character; thus"hisssss" would only have one repeatedcharacter. Assume that the function has the prototypestatement:int repeat(char *ptr);
All help is appreciated. Thank you!