Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / kanan

int k = 3;

for (int i = 1; i <= 4; i++)
{
for (int j = k; j > 0; j--)
{
Response.Write("&nbsp;&nbsp;");
}
for (int x = 0; x < i; x++)
{
Response.Write("#");
Response.Write("&nbsp;&nbsp;");
}
k--;
Response.Write("<br/>");

Is This Answer Correct ?    15 Yes 1 No

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

Answer / elan

Hi Kanan,

Your code will work, however it was very standard one and
in interview, interviewer will expect candidate to provide
answers with regards to Array. In that point of view we
have provide answers using array. It will express our
knowledge in Array to employer.

I hope my answer make sence. Please provide your comments
if you have anything.

Is This Answer Correct ?    6 Yes 1 No

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

Answer / elan

Hi Kannan,

Also my reply is for the following question.

write program in C# for palindrome? (aug 2009)

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More C Sharp Interview Questions

What does break do in loop?

0 Answers  


Write a program in C# for checking a given number is PRIME or not.

0 Answers  


What is cshtml extension?

0 Answers  


Can we have the method in drived class with the same name which is there in base class?

6 Answers   TCS,


How can i load the text box and label at the runtime based on the existing text box and tabel

2 Answers   Merrill Lynch, Patni,


Any problem found in vs.et

0 Answers   Digital GlobalSoft,


What is a multicast c# delegate?

0 Answers  


How can we insert 100 records @ a time without using for loop into the databse

10 Answers   IBM,


Why do we parse in c#?

0 Answers  


What is the use of console application in c#?

0 Answers  


Define parsing?

0 Answers  


WHICH IS THE BEST BOOK FOR A BEGINNER TO LEARN AP.NET 3.5, C#.NET & ALL THE FEATURES OF VISUAL STUDIO2008? WHAT ARE THE CERTIFICATIONS IN THIS FIELD? WHICH IS BEST BOOK FOR CLAERING CERTIFICATION EXAM? PLZ HELP ME YAAR

1 Answers  


Categories