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 are the access modifiers in c#?
What is difference between dictionary and hashtable?
Why singleton is sealed?
What is the compiler of c#?
What does console writeline do?
Can you pass value types by reference to a method?
What is the difference between null and string empty in c#?
How do I develop c# apps?
What are c# types?
What is interface inheritance?
What are the Types of JIT and what is econo-JIT
Why to use lock statement in c#?
What are escape sequences explain with example?
What is the full form of GAC? Explain its uses?
What is the use of base keyword? Tell me a practical example for base keyword’s usage?