Pls help me debug the code

Why on inserting β€˜\0’ character at the end of string β€œans” all test cases are getting wrong and on removing it all TCs are getting passed?

@Senjuti256
that wont matter.must be something with backend
to make your code work add c-- to your while(c>0) loop .
that will pass all the test cases
Mark your doubt as resolved if u are satisified :slight_smile:

ooo yea that correction I have done