what will be the output of the given below coding.
using System;
public class Exercise
{
static void OddNumbers(int a)
{
if (a >= 1)
{
Console.Write("{0}, ", a);
a -= 2;
OddNumbers(a);
}
}
public static int Main()
{
const int Number = 9;
Console.WriteLine("Odd Numbers");
OddNumbers(Number);
Console.WriteLine();
return 0;
}
}
Answer Posted / nitish yadav
9,7,5,3,1
| Is This Answer Correct ? | 16 Yes | 1 No |
Post New Answer View All Answers
What is the default value of boolean variable?
Is array value type in c#?
What is difference between singleordefault and firstordefault?
Can a class be protected in c#?
What can be done with c#?
What are regular expressions? Search a string using regular expressions?
How do I link two windows forms in c#?
In which way a two-dimensional array declared in C#?
Explain the difference between // comments, /* */ comments and /// comments?
Illustrate the process of code compilation in c#?
Explain the difference between the debug class and trace class?
In a C# class we have a SortedList member m_addinProjects
we want to provide an iterator to allow the consumer of
this class access to the items in the collection. Please
provide an iterator method for the AnalyzeAddinsDLL class
below and an example of how it would be used.
namespace AnalyzeAddinsDLL
{
public class AllAddInProjects
{
private SortedList
In languages without exception-handling facilities, we could send an error-handling procedure as a parameter to each procedure that can detect errors that must be handled. What disadvantages are there to this method?
Do while loops yes or no c#?
What is hashtable in c# net with example?