Multiple choice technology programming languages

Identify the statements that are correct: (A) int a = 13, a>>2 = 3 (B) int b = -8, b>>1 = -4 (C) int a = 13, a>>>2 = 3 (D) int b = -8, b>>>1 = -4

  1. (A) & (B)

  2. (A), (B), (C) & (D)

  3. (A), (B) & (C)

  4. (C) & (D)

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

For (A): 13 >> 2 = 3 (correct). For (B): -8 >> 1 = -4 (correct, sign bit extends). For (C): 13 >>> 2 = 3 (correct). For (D): -8 >>> 1 = 2147483644 (incorrect, not -4). Option C is best match.