Grace
2013-04-10 17:11:30 UTC
Write a function called str_remove() that removes all occurrences of the second string from
the first string.
In function main do the following:
a) Declare a character array called list1 of size 500
b) Declare another character called list2 of size 20
c) Read a string from the keyboard and store it in list1
d) Read another string from the keyboard and store it in list2
e) Call function str_remove() to remove all occurrences of list2 from list1
f) Display list1
Function str_remove():
void str_remove(char *str1, char *str2);
Example:
If the user entered for the 1st string: “Hello World”
And the user entered for the 2nd string: “llo”
The output should be: “He World”
Another Example:
If the user entered for the 1st string: “it’s not a bug – it’s an undocumented feature”
And the user entered for the 2nd string: “it’s ”
The output should be: “not a bug – an undocumented feature”
You can using