How much does SCP 1.4 depend on knowing operator precedence? I don't see it listed among the exam objectives, but some of the questions in the K&B Self Test for Chapter 3 rely on, for example, knowing that && has a higher precedence than || and knowing that + is evaluated left to right. Does the real exam also require you to know that?
I don't remember exactly - I would say the 1.4 exam does not require extensive knowledge of the precedence of all operators. Or if it does, I didn't happen to get those questions when I took the exam. Personally I just remember that * and / are before + and -, which are before any relational operators, which are before && which is before ||. So I can correctly evaluate something like
if (x + 2 * y > 7 || x < 0 && y == 0)
though in real life of course I'd want some parens in there.
That's probably more than you need to know for the exam, but my point is that if the exam had required more than that from me, I'd probably remember that fact now. The exam probably doesn't expect you to know that && is before ||, and may well require less than that - but I couldn't say how much less.
Hope that helps... [ March 10, 2006: Message edited by: Jim Yingst ]