

MCQOPTIONS
Saved Bookmarks
1. |
Select the output for the following set of 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 |
C. | 0, 22, 1 |
D. | 0, 22, 0 |
Answer» C. 0, 22, 1 | |