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

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!