Like a Java switch.



  • введите сюда описание изображения

    I don't understand where 6 came from, I thought it would be 2 because I lost my interview. I wonder why it's 6, not 2?



  • Your thoughts will forget that there is no breakand in this case case It's." I mean, roughly, the compiler sees this code differently.

    i = 0;
    s = 0;
    s+=2; i+=s;
    s+=2; i+=s;
    

    The right answer to that question is not here. breakThat's a bad code.


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2