MVP, Author


Hits: 416

Dictionary meaning: a word, line, verse, number, sentence, etc., reading the same backward as forward, as Madam 

Palindrome in the C# language: A palindrome has the same letters on both ends of the string. This means “rotator” is a palindrome, but “advice” is not.

The simplest concept to test a string as a palindrome is to check if it’s the same reversed as it was originally. Thus our first C# palindrome function will reverse the entire string and compare it to the original.

Code Sample:

Out Put:
Enter a String to check for Palindrome:
Shashangka is not a palindrome
Original Input is = Shashangka
Reversed Input is = akgnahsahS

Post a comment