practice test-1(operators)
practice test-1(operators)
II) Identify the operator that gets the highest precedence while evaluating the given
expression:
[2025-SPECIMEN]
a+b%c*d–e
(a) +
(b) %
(c) –
(d) *
III) Evaluate the given expression when the value of a = 2 and b = 3.
[2025 SPECIMEN]
b *= a++ – ++b + ++a;
System.out.println(“a = ” + a);
System.out.println(“b = ” + b);
xviii) What is the result of the logical AND operator (&&) if both operands are true?
a) true b) false c) 1 d) 0
xix) What is the result of the logical AND operator (&&) if both operands are true?
a) true b) false c) 1 d) 0
xx) ) Which of the following is not a compound assignment operator?
a) += b) /= c) %= d) ==
xxi) Given the java statement System.out.println(a>b && b!=c) what will be the output if
a=6, b=4,c=4
a)true b)2 c)false d)14