• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
November 02, 2022 |340 Views
C++ Program to insert a star between pair of identical characters
  Share  1 Like
Description
Discussion

In this video, write a C++ program to insert a star between pair of identical characters

We must use recursion to put a star, "*," between two adjacent identical characters. Verify that the first two characters are the same. If so, place a " * " in between them. As we check for identical characters at the first two positions of the string so we now make a recursive call without the first character of the string