Comparing kth character from the beginning and N - kth character from the end . If all the characters match , then the number is a palindrome
while ( l < r ) { if ( str [ l ] != str [ r ] ) { cout << " No " ; return ; } l ++ ; r -- ; }