write program in C# for palindrome? (aug 2009)
write program in C3 for generating below output?(aug 2009)
#
# #
# # #
# # # #

Answer Posted / elan

string sName = "elan";
char[] aName = sName.ToCharArray();
Array.Reverse(aName);
string sReversedName = new string(aName);
if (sName == sReversedName)
{
MessageBox.Show("it is palindrome");
}
else
{
MessageBox.Show("it is not palindrome");
}

Is This Answer Correct ?    25 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you have an array of arrays?

686


what are the different ways a method can be overloaded?

682


What is an interface class in c#?

737


Are tuples mutable c#?

646


Can a class have static constructor?

737


How do I create a multi language, multi file assembly?

817


Why do we use struct in c#?

712


What are primitive data types in c#?

701


What is datarelation c#?

652


Do void methods have parameters?

679


What is a view? What is the use of it?

776


What is void in c#?

726


List some of the common data providers for ado.net framework?

630


What is difference between dll and exe in c#?

664


What is a string in c#?

652