Biology Forums - Study Force

Science-Related Homework Help Computer Studies Topic started by: Oughto on Dec 16, 2016



Title: What would be the value of x after the following statements were executed?int x = 10;switch (x){ ...
Post by: Oughto on Dec 16, 2016
What would be the value of x after the following statements were executed?

int x = 10;
switch (x)
{
  case 10:
      x += 15;
  case 12:
      x -= 5;
      break;
  default:
      x *= 3;
}

A) 25
B) 30
C) 20
D) 5


Title: Re: What would be the value of x after the following statements were executed?int x = 10;switch (x){ ...
Post by: Toothy on Dec 16, 2016
Content hidden


Title: Re: What would be the value of x after the following statements were executed?int x = 10;switch (x){ ...
Post by: Oughto on Jan 31, 2017
I mentioned in my previous post that I chose this as an elective, thanks for helping me understand


Title: Re: What would be the value of x after the following statements were executed?int x = 10;switch (x){ ...
Post by: Toothy on Mar 16, 2017
Thanks for providing feedback