Question: CODEBLOCKS, C CODE, USING ONLY STDIO.H and STRING.H write a program that will delete all instances of a substring within a main string. You are

CODEBLOCKS, C CODE, USING ONLY STDIO.H and STRING.H

write a program that will delete all instances of a substring within a main string. You are to separately read in the main string and the substring and then

display the modified string. For example, assume that the string is The cat in the hat and the substring is at: your output should read:

string: The cat in the hat

substring: at

result: The c in the h

- Use the function: char * strdel(char *s1, const char *s2);

-Function is case sensitive

-Assume that the string and substring are read in from a file or from the user.

-You can assume that the length of the substring is never greater than the length of the string and that neither exceeds 250 characters.

-use gets() and puts()

-function removes excess whitespace following the deletion of a word

-Your program is to consider whitespace for matching; that is, at and at are not equivalent

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