Question: There is only one coding question for HW 1 1 . The question asks for two functions for one C program. String manipulation Create a
There is only one coding question for HW The question asks for two functions for one C program. String manipulation Create a function void removeWhiteconst char str char noWhiteStr that removes all white spaces inside str and stores the resulting string in noWhiteStr. Create a function bool substringconst char noWhiteStr const char noWhiteStr that takes two strings as parameters and returns true if the first string noWhiteStr is a substring of the second string noWhiteStrwithout using strstr function or strchr function from string.h library. Using strstr or strchr from string.h will result in point If one string is a substring of another string, it means that the characters of the first string appear consecutively within the second string, in the same order as they appear in the first string. For example, bcd is a substring of "abcde", ae is NOT a substring of "abcde". Write a program strProcessingc that uses the two functions you wrote. Not definingcalling removeWhite function or substring function will result in point. Your program should first ask the user to enter two strings. It is possible the entered strings contain white spaces. We assume the length of each entered string is less than characters. For each entered string, the program should then call removeWhite function to compute the new corresponding string without white spaces. After we obtain two new strings without white spaces, we check if the first one is a substring of the second string by calling substring function. Example : Example :
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
