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 is dao in c#?

0 Answers  


Explain about accessibility modifier 'protected internal'?

0 Answers  


What is jit? What are the different types of jit?

0 Answers  


What?s the top .NET class that everything is derived from?

4 Answers   Hindawi, Siebel, Visual Soft,


Explain how to implement delegates in c#.net

0 Answers  


What is private variable?

0 Answers  


What is disconnected data architecture in c#?

0 Answers  


What is list collection in c#?

0 Answers  


what are the differences b/w structure and class?

10 Answers  


What Is The Difference Between ViewState and SessionState?

1 Answers   Fiserv,


What is stringwriter c#?

0 Answers  


How do you implement multiple inheritance in .NET?

10 Answers   Microsoft,


Categories