printf ( " \n " ) ;
start = ( maxLPSCenterPosition - maxLPSLength ) / 2 ; end = start + maxLPSLength - 1 ; printf ( " LPS ▁ of ▁ string ▁ is ▁ % s ▁ : ▁ " , text ) ; for ( i = start ; i <= end ; i ++ ) printf ( " % c " , text [ i ] ) ; printf ( " STRNEWLINE " ) ; } int main ( int argc , char * argv [ ] ) { strcpy ( text , " babcbabcbaccba " ) ; findLongestPalindromicString ( ) ; strcpy ( text , " abaaba " ) ; findLongestPalindromicString ( ) ; strcpy ( text , " abababa " ) ; findLongestPalindromicString ( ) ; strcpy ( text , " abcbabcbabcba " ) ; findLongestPalindromicString ( ) ; strcpy ( text , " forgeeksskeegfor " ) ; findLongestPalindromicString ( ) ; strcpy ( text , " caba " ) ; findLongestPalindromicString ( ) ; strcpy ( text , " abacdfgdcaba " ) ; findLongestPalindromicString ( ) ; strcpy ( text , " abacdfgdcabba " ) ; findLongestPalindromicString ( ) ; strcpy ( text , " abacdedcaba " ) ; findLongestPalindromicString ( ) ; return 0 ; }