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 collection of classes in c#?

0 Answers  


I need code to connect ohter systems in the LAN and i want to display my website image over there and i want explain as a admin through phone. So i need code to access other system using C-Sharp. Any one please help me.Please give me the code. Advace thanks.

0 Answers   Excel,


How do you concatenate in c#?

0 Answers  


explain DIFFERENCE BETWEEN CLASS AND MODULE?

3 Answers  


What is master page in asp net c#?

0 Answers  






Asha buys 16 Chocolates for rs 12 and 24 chocolates for rs 20, if she sold them 30 chocolates for rs 30 then what is the Gain/Loss percentage? Gain(700/19 %) Loss(700/19 %) Gain(500/19 %) Loss(500/19 %) If one person ate 100 grapes in 5 days and 6 more each day from starting, what was the no of grapes he ate on first day? 6 8 10 7 If seven men P, Q, R, S, T, U, V parked his car, P and Q something like that. 6 student J, K, L, M, N, O went for picnic in 2 batches, K and L have to go together, M and O do't go together, if O and L go in one batch then which of these combination will be wrong. Jmnp Jklo klop JKLO a boat can go upstream and down stream, if it goes 5/2 times of downstream at the speed of 6 kmph then what will be the speed of upstream? 15 KMPH 12 KMPH 10 KMPH 11 KMPH A, B, C, D, E sitting on a table, A sits 2 seat left from B and C sits 2 seat right from B then what will not be the combination ACDE

0 Answers   Symphony,


7. C# provides a default constructor for me. I write a constructor that takes a string as a parameter, but want to keep the no parameter one. How many constructors should I write?

2 Answers  


Can you create sealed abstract class in c#?

0 Answers  


What is serialization in dot net?

0 Answers  


When you inherit a protected class-level variable, who is it available to?

5 Answers   CMC, IBM,


7.What are typed data set?

2 Answers   Ebix, Mphasis,


Is it possible to force garbage collector to run?

0 Answers  


Categories