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

What is an escape sequence in c#?

509


What is nameof c#?

491


What is the difference between ienumerable and icollection?

470


Explain how to add controls dynamically to the form using c#.net.

558


Where value types are stored in c#?

506






Is 0 an unsigned integer?

499


Write a program in c# to find the angle between the hours and minutes in a clock?

489


Okay, so an int is a value type, and a class is a reference type. How can int be derived from object?

553


What is the C# syntax to catch any possible exception?

532


Can you change the value of a constant filed after its declaration?

526


What all details the assembly manifest will contain?

434


Does c# support c type macros?

557


Is javascript harder than c#?

518


What is reflection in c#?

496


What is interface c#?

464