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 HW11. The question asks for two functions for one C program. String manipulation Create a function void removeWhite(const char *str, char *noWhiteStr) that removes all white spaces inside str and stores the resulting string in noWhiteStr. Create a function bool substring(const char *noWhiteStr1, const char *noWhiteStr2) that takes two strings as parameters and returns true if the first string noWhiteStr1 is a substring of the second string noWhiteStr2(without using strstr function or strchr function from string.h library. Using strstr or strchr from string.h will result in 0 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 (strProcessing.c) that uses the two functions you wrote. Not defining/calling removeWhite() function or substring() function will result in 0 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 100 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 1: Example 2:

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 Programming Questions!