What is the return value of the following method, for an initial value of x = 5?

In Microsoft Dynamics AX 2012, what is the return value of the following method, for an initial value of x = 5? static int sampleSwitch(int x)
{;
switch (x)
{
case (1):
x = 5;
case (5):
x = x + 5;
case (10):
x = x + 10;
break;
case (20):
x = x + 20;
break;
default:
x = 5;
}
info(strfmt(“Return value is %1”, x));
return x;
}
} info(strfmt("Return value is %1", x));
return x;
}
A. 5
B. 10
C. 20
D. 25

microsoft-exams

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.