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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started