Write code for palindrome?

Answer Posted / bikas pandey

using System;
namespace PalindromeChecker
{
class Palindrome
{
public static void Main(strin[] args)
{
string ename="anna";
Char[] array=ename.ToCharArray();
Array.Reverse(array);
String reversename=new String(array);
if(ename==reversename)
{
Console.WriteLine("It's A Palindrome");
}
else
{
Console.WriteLIne("It's Not A Palindrome");
}
Console.ReadLine();
}
}
}

Is This Answer Correct ?    11 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe ways of cleaning up objects in c#.

682


What is difference between mutable and immutable in c#?

649


State the top.NET class that everything is derived from?

714


What is asp net c#?

675


What is difference between ienumerable and list in c#?

634


Name some string escape sequences in c#.

782


Why do we need to call CG.SupressFinalize?

729


What does exclamation mark mean in access query?

756


What is class and object c#?

655


I have 3 overloaded constructors in my class. In order to avoid making instance of the class do I need to make all constructors to private?

742


How do I format in c#?

652


What is check/uncheck?

810


What is the difference between Static, Const and read only?

815


What is hashset c#?

679


What are the 3 different types of arrays?

774