

MCQOPTIONS
Saved Bookmarks
1. |
Select output for the set of code : static void Main(string[] args) { int []a = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; func(ref a); Console.ReadLine(); } static void func(ref int[] x) { Console.WriteLine(" numbers are:"); for (int i = 0; i < x.Length; i++) { if (x[i] % 2 == 0) { x[i] = x[i] + 1; Console.WriteLine(x[i]); } } } |
A. | Numbers are : 2 4 6 8 10 |
B. | Numbers are : 3 5 7 9 11 |
C. | Numbers are : 2 3 4 5 6 |
D. | None of the mentioned |
Answer» C. Numbers are : 2 3 4 5 6 | |