Question:What will the following code print?
int num = 2;
switch (num) {
    case 1:
        Console.WriteLine("One");
        break;
    case 2:
        Console.WriteLine("Two");
        goto case 1;
    case 3:
        Console.WriteLine("Three");
        break;
    default:
        Console.WriteLine("Default");
        break;
}
 

A One 

B Two 

C One and Three 

D Default 

+ Answer
+ Explanation
+ Report
Total Preview: 18

Copyright © 2024. Powered by Intellect Software Ltd