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


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, k = 3;<br>switch (i - k)<br>3.<br>4.<br>5.<br>{<br>6.<br>case -1:<br>7.<br>++i;<br>8.<br>++k;<br>9.<br>break;<br>10.<br>case 2:<br>11.<br>--i;<br>12.<br>++k;<br>13.<br>break;<br>14.<br>default:<br>15.<br>i += 3;<br>16.<br>k += i;<br>17.<br>break;<br>18.<br>}<br>19.<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, k = 3; switch (i - k) 3. 4. 5. { 6. case -1: 7. ++i; 8. ++k; 9. break; 10. case 2: 11. --i; 12. ++k; 13. break; 14. default: 15. i += 3; 16. k += i; 17. break; 18. } 19. Console.WriteLine (i + "\n" + k); 20. Console. ReadLine(); 21. } a) 233 b) 323 c) 3 44 d) 5 10 10

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here