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;
}
}



what will be the output of the given below coding. using System; public class Exercise { s..

Answer / nitish yadav

9,7,5,3,1

Is This Answer Correct ?    16 Yes 1 No

Post New Answer

More C Sharp Interview Questions

What is distribute by in hive?

0 Answers  


How many destructors can a class have?

0 Answers  


Why do we override in c#?

0 Answers  


What is the difference between parse and tryparse in c#?

0 Answers  


What is the output of TextWriterTraceListener redirected?

0 Answers   Siebel,






What is querystring in c#?

0 Answers  


What is object type in c#?

0 Answers  


What's your approach to fetch static data in your windows form application?

0 Answers   MCN Solutions,


Explain the difference between a sub and a function?

1 Answers   Wipro,


Does unity use c++ or c#?

0 Answers  


Explain About delegates

0 Answers   TCS,


Tell me something about Exceptions. What is the common exception class?

4 Answers   HCL,


Categories