Here it is printing the same string…
Does it because i am using string instead of character array …what is the difference …
Wrong output it is showing
you dont need to go through recursion to solve this problem you can simply iterate the string and print 3.14 whenever you encounter pi, It is generally not a good idea to append and move elements to the given string as it is error prone and increases the time complexity.
Code
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.