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

Is static thread safe?

486


What are events in C#?

556


What are custom attributes in c#?

495


What is delegates in c# and uses of delegates?

470


What is .net console?

530






Does c# have functions?

462


the c# keyword .int. Maps to which .net type?

746


Illustrate the process of code compilation in c#?

521


How is a string immutable?

488


What is the difference between an application domain and a process?

478


Is string nullable in c#?

453


What is CLR and its application.?

562


What is a property in c#?

472


Why data types are important in c#?

479


What is value c#?

458