Printing wrong output


sir/maam its printing wrong output from second string can u explain me why this is so and how to do correct

hey @Ashu1318 ,
Sorry to be so late .
you just need to make small changes
like which if condition to call first and how to update the strings to sent.

check this https://ide.codingblocks.com/s/404104 .

Hope it helps. :slightly_smiling_face:.

so basically our original string does not change??

yeah, we just need to pass its updated version further and not updating it everytime.

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.