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
Why do we use static class in c#?
What happens if a static constructor throws an exception?
Which is faster array or arraylist in c#?
What is difference between ienumerable and enumerable in c#?
What is Dependency of Injection?
What is default method in c#?
Can class inherit from struct c#?
Which class does the remote object has to inherit?
hi my question is about understanding a text the user entered to a site , so i want to analyse that text looking for some specific items such as "honda" "shoffere" etc.. so if this site could help or could tell me where to go with such question ,i wonder. thanks
Which is executed if an exception has not occurred?
What is garbage collector and where should you use in .NET?
How can you write a class to restrict that only one object of this class can be created (Singleton class)?
Explain the difference between .net and c#?
How many bytes is a char c#?
How do you pass reference parameters in c#?