

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A cse 11 quiz 1 focused on operator precedence and short-circuit evaluation. Students are required to evaluate given boolean expressions using the provided operator precedence table and determine the printed values. The quiz also includes multiple-choice questions related to boolean variable assignments and operator precedence rules.
Typology: Exercises
1 / 2
This page cannot be seen from the preview
Don't miss anything!


int a = 7; int b = -1; 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; System.out.print( "z = " + z ); ____________________
z = exp1 || exp2 && exp3; System.out.print( "z = " + z ); ____________________
b = --b + ++a % 4 * c++ * 2; System.out.print( "a = " + a ); ____________________
System.out.print( "b = " + b ); ____________________
System.out.print( "c = " + c ); ____________________
x = y; y = !x; x = !y;
b = ( b == false );
int a = 2; int b = 0; int c = 5;
System.out.println( (a + b) + c + " = " + a + (b + c) );
System.out.println( a + (b + c) + " = " + (a + b) + c );
System.out.println( (a + b + c) + " = " + a + b + c );
if ( x == 0 ) { if ( y == 1 ) z = z + 2; } else { z = z + 4; }
2 * 3 + 4 * 5