Ask coding questions

← Back to all posts
Extra "0" is printed at the end of each reversed string.
ConleyKoe

The following is the exact output of my attached repl.

madam0

ada0

ecalevol0

Does anyone have any idea why this 0 is there? I can't seem to get rid of it. I read online about the 0 being the terminator for the string but if so, how do I not print it?

Voters
ConleyKoe
Comments
hotnewtop
widz

0 means false and 1 means true your 'is_palindrome' function 'return false' in int format