Result of operations

Report a typo

Given two initialized variables:


int var1 = 100;
int var2 = 0;

What is a value of var2 after executing the following code?

switch (var1) {
    case 100:
        var2 += var1;
    case 200:
        var2 += var1 / 4;
        break;
    case 300:
        var2 += var1 / 10;
        break;
}
Enter a number
___

Create a free account to access the full topic