Multiple choice technology programming languages

Which of the following is true with respect to Relational Operators?

  1. Order of precedence is after Bitwise Operators

  2. Order of precedence is prior to Type casting operators

  3. The order of precedence is prior to Shift operators

  4. Order of precedence is next to Shift Operators

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

In operator precedence hierarchies (C/C++/Java), relational operators (<, >, <=, >=) have precedence immediately adjacent to shift operators (<<, >>), with relational operators having slightly higher precedence. The answer is D because relational operators and shift operators are close in precedence level. Option A is incorrect because bitwise operators (including shift) don't all have the same precedence. Option B is incorrect because type casting has higher precedence than relational operators. Option C is incorrect because relational operators have higher precedence than shift operators.