Question
Write a function (in C Program) char *delete SubSt ring (char *source, char *substring) that takes two strings called source and substring as its parameters.
Write a function (in C Program) char *delete SubSt ring (char *source, char *substring) that takes two strings called source and substring as its parameters. It should return a new dynamically allocated string that is constructed from the strings source and substring. The newly created and returned string should be the same as the source string, but with the first occurrence of the string, substring removed. For example, if the string source has the value "my Toronto", and the string substring has the value "to", the function will return the string "my ronto".
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