Q72
What will be the output of the following C# code? class method1 public int fun(int m) return( m++ % 10); class Program static void Main(string[] args) int a = 23, b = 0, c; method1 z = new method1(); c = z.fun (++b * --a % 2); int d = (z.fun (c-- + --a)); Console.WriteLine(c); Console.WriteLine(a++); Console.WriteLine(d); Console.ReadLine();
A.
-1, 22, 0
B.
-1, 21, 1
AnswerC.
0, 22, 1
D.
0, 22, 0
Answer: Option B
Solution
Answer: Option B
No explanation is given for this question Let's Discuss on Board