Saved Bookmarks
| 1. |
Int z=++*(y-)-y if x=20 and y=10? |
|
Answer» Answer: Answer is 176. Explanation: In ORDER to solve the given problem, we need to FIRST know about the operator precedence. • Brackets always take the first precedence • Increment/ decrement operators (ASSOCIATIVITY – right to left) • Arithmetic operator (associativity – left to right) • BINARY operator • Left and right shift • Comparison operator • Bitwise operator and so on. As per the given guidelines, (y++ + 5) -->y++ = 10+1 = 11, 11 + 5 = 16 ++y -->1 + 10 = 11 (++y*(y++ + 5)) --> 16 * 11 = 176 |
|