Check if str [ 0. . i ] is palindrome using simple character by character match
for ( j = 0 ; j < i / 2 ; j ++ ) { if ( str [ j ] != str [ i - j ] ) { break ; } } Console . WriteLine ( ( j == i / 2 ) ? str [ i ] + " ▁ Yes " : str [ i ] + " ▁ No " ) ; } else { Console . WriteLine ( str [ i ] + " ▁ No " ) ; }