Question: IN C CODE LANGUAGE: Create a function named countSubstring which takes two arguments; a string ( char pointer ) and a character and returns the
IN C CODE LANGUAGE: Create a function named countSubstring which takes two arguments; a string char pointer and a character and returns the number of characters between the first occurrence of that character and the end of the string. For example, if the string is "abcdabcddeeffgghhiij" and the character is d then the subroutine should return since exactly characters are in the string after the first d Note the first d is not counted. The underlined characters are counted: "abcdabcddeeffgghhiij" This function should ignore case where applicable. Using the same string above with a character D should also return The string may contain any valid printable character. It wont just contain alphabetic characters. The character may be any printable character. ALSO, the string could be and c so it should return, You must include that. Do NOT use toLower or toUpper. Use c you must add to the ascii code
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
