Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

String manipulation Create a function removeWhite(const char *str1, char *str2)

ID: 3687239 • Letter: S

Question

String manipulation Create a function removeWhite(const char *str1, char *str2) that removes all spaces inside str1 and stores the resulting string in str.2. Create a function substring(const char *big, const char *small) that takes two strings as parameters and returns 1 if the string small is included in the string big (without using string.h functions strstr or strchr) Write a program (strProcessing.c) that uses the two functions you wrote. Your program should first ask the user to enter a string (possibly containing spaces). It should then use removeWhite to compute the new corresponding string without spaces and print it to the standard output. Next, your program should ask the user to enter two strings, read them and outputs one of the following statements accordingly: The string XXXX contains the string YYYY. The string XXXX does not contain the string YYYY Where XXXX and YYYY are replaced by the actual strings entered by the user.

Explanation / Answer

Program 1:

method2:

or

2)