Question: C++ program. How to solve this task? Write a function, deleteChar, which deletes any occurrence in the string provided in the first argument, a, of

C++ program.
How to solve this task?  C++ program. How to solve this task? Write a function, deleteChar,

Write a function, deleteChar, which deletes any occurrence in the string provided in the first argument, a, of the single character which is the second argument, c. The function should return the length of the new string after deleting all occurrences of the letter. Assume the prototype is: int deleteChar(char all, char c); Sample Run: Type in a string: Hi Hello World Enter a letter to delete: o The length of the string before the deletion: 14 The string after deleting the character o' Hi Hell Wrld The new length of the string is: 12

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!