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 types of comments in c#?
What's the difference between WindowsDefaultLocation and WindowsDefaultBounds?
What are mutable and immutable types in c#?
How to force my .net app to run as administrator on windows 7?
Why we need get set property in c#?
What is difference between an reference type and value type in C#?
Describe a Struct ?
What is a delegate? How can it works?
Is there any sample c# code for simple threading?
What are circular references?
explain the features of static/shared classes.
What does char mean in c#?
What is winforms c#?
Explain synchronous and asynchronous operations?
What is the difference between constants and read-only?