Week+2+-+Selections

http://liang.armstrong.edu/selftest/selftest8e?chapter=3 =**(see discussions above right...)**= What is y after the following statement is executed? x = 0; y = (x > 0) ? 10 : -10; (A. -10)
 * Chapter 3: Conditions/selections**
 * Review quiz here:**
 * 30**

y = (x > 0) ? 10 : -10; Is a shortcut selection statement, it's equivalent to: if (x > 0) { y = 10; } else { y = -10; }