Satyam P.

asked • 03/20/20

Conditional Statements In C Programmin

Question 1

1.Given the following code:

switch(x - y) {
case 0:
return x;
case 4:

break;
case 7:
x = x - 1;
case 9:
return x*y;
case 3:

default:
return y - x;
}
return y;
}

What does g(9, 5) evaluate to?



2.Question


Consider the following code:

if (x + 2 < y) {
x = x + 3;
return y * x;

else {
return x + y + 2;

What does f(5, 10) evaluate to?


1 Expert Answer

By:

Patrick B. answered • 03/20/20

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.