Quiz1.fa09

Quiz1.fa09 - Signature _ cs11f _ CSE 11 Quiz 1 Fall 2009...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Signature _____________________ CSE 11 Name ________________________ Quiz 1 cs11f ____ Fall 2009 Student ID ____________________ This quiz is to be taken by yourself with closed books, closed notes, no calculators. (Partial) Operator Precedence Table Operators Associativity ! ++ -- (pre & post inc/dec) right to left * / % left to right + - left to right < <= > >= left to right == != left to right && left to right || left to right = right to left 1) Which of the following are not valid Java identifiers? (Circle your answer(s).) this&that thisRthat This2That integer This-That this_R_that 2_This_That this1+that1 2) Using the operator precedence table above, evaluate each expression and state what gets printed. Remember short-circuit evaluation with and || . int a = 5; int b = 2; int c = -2; boolean exp1 = a + b * c <= a + c * b; _________ (value of exp1) boolean exp2 = !(c + a > b); _________ (value of exp2) boolean exp3 = b - a >= c; _________ (value of exp3) boolean z = exp1 && exp2 || exp3;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/07/2011 for the course CSE CSE11 taught by Professor Cs during the Spring '10 term at UCSD.

Page1 / 2

Quiz1.fa09 - Signature _ cs11f _ CSE 11 Quiz 1 Fall 2009...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online