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
Answer / kanan
int k = 3;
for (int i = 1; i <= 4; i++)
{
for (int j = k; j > 0; j--)
{
Response.Write(" ");
}
for (int x = 0; x < i; x++)
{
Response.Write("#");
Response.Write(" ");
}
k--;
Response.Write("<br/>");
| Is This Answer Correct ? | 15 Yes | 1 No |
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 |
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 |
Is array reference type / value type?
Can we inherit an abstract class in another abstract class. If no why and If yes how..?
Can we declare class as protected?
What is the implicit name of the parameter that gets passed into the set method/property of a class?
Can an array be null c#?
What is the difference between readkey and readline in c#?
How to raise an selection changed event associated with listbox in datagridview control with a sample example?Here the listbox is a child control associated with datagridview control.
Why is c# better than java?
Why var is used in c#?
if we are updating a database using thread, and mean while application crashes or thread being aborted then what will happen in Database? Rollback or Database will be updated? Please explain with different scenario.
What is difference between ienumerable and iqueryable in c#?
What is difference between assembly and dll?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)