What will be the output of the following C# code? 1. static void Main(string[] args) 2. { int i = 2, j 3, k = 4; 3. 4. switch (i +j k) 5. { 6. case 0: case 2: case 4: 7. ++i; 8. k += j; 9. break; 10....


What will be the output of the following C# code?<br>1.<br>static void Main(string[] args)<br>2.<br>{<br>int i = 2, j<br>3, k = 4;<br>3.<br>4.<br>switch (i +j<br>k)<br>5.<br>{<br>6.<br>case 0: case 2: case 4:<br>7.<br>++i;<br>8.<br>k +=<br>j;<br>9.<br>break;<br>10.<br>case 1: case 3: case 5 :<br>11.<br>-i;<br>12.<br>k -=<br>j;<br>13.<br>break;<br>14.<br>default:<br>15.<br>i +=<br>j;<br>16.<br>break;<br>17.<br>18.<br>Console.Writeline(i +

Extracted text: What will be the output of the following C# code? 1. static void Main(string[] args) 2. { int i = 2, j 3, k = 4; 3. 4. switch (i +j k) 5. { 6. case 0: case 2: case 4: 7. ++i; 8. k += j; 9. break; 10. case 1: case 3: case 5 : 11. -i; 12. k -= j; 13. break; 14. default: 15. i += j; 16. break; 17. 18. Console.Writeline(i + "\n" + j + "\n" + k); Console. ReadLine(); 19. 20. } a) 131 b) 2 34 c) 5 34 d) Compile time error

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here