Pls check my code sir


pls reply sir

hi @pankajsingh what problem are you facing?

please anybody respond to this query

wrong answer is displayed in the output

i dont know what i have done wrong

@pankajsingh printing extra space in the end

ishita mam, please provide the correct working soln

hi @pankajsingh
you are dealing with strings, not character arrays. You dont need to do this
image
It should pass the test cases if you remove this statement (s+=’\0’)

yes mam it get solved,but please tell what difference it has created

@pankajsingh as I mentioned above it was adding an additional character in your string that is why it was not matching with the output string given in the question

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.