Reverse String Code Using Logical Operators