logo CodeStepByStep logo

You are working on problem set: Recursion Problems ( Pause)

moveToEnd

Language/Type: C++ recursion string return
Related Links:

Write a recursive function named moveToEnd that accepts a string s and a character c as parameters, and returns a new string similar to s but with all instances of c moved to the end of the string. The relative order of the other characters should be unchanged from their order in the original string s. If the character is a letter of the alphabet, all occurrences of that letter in either upper or lowercase should be moved to the end and converted to uppercase. If s does not contain c, it should be returned unmodified.

Function: Write a C++ function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? .

If something seems wrong with our site, please

Is there a problem? Contact us.