Computer Science, asked by deeptanshutripathi26, 8 months ago

Q3. The values of variable A and B are
25 and 75 respectively. The output of
the statement System.out.println(A>B)
will be true.​

Answers

Answered by 452892
0

Answer:

1. Let the variables a, b, and c be of type boolean and a and c have been assigned a value. What value is  

assigned to b in each of these four assignment statements? Show your work for full credit.

(a) b = (8 < 10 && false);

b = (true && false);

b = false;

(b) b = (Math.pow(2.0, 3.0) > Math.ceil(7.2));

b = (8.0 > 8.0);

b = false;

(c) b = !true || (!false && true);

b = false || (true && true);

b = false || true;

b = true;

(d) b = (a || !c) == (c && !a); Hint: think truth table

Truth table:

a c a || !c c && !a b

T T T F F

T F T F F

F T F T F

F F T F F

b = false

Explanation:

Similar questions