arrow
arrow
arrow
Which of the following correctly lists the precedence of operators in ascending order (from lowest to highest) in C?
Question



Which of the following correctly lists the precedence of operators in ascending order (from lowest to highest) in C?

A.

Logical AND (&&), Addition (+), Multiplication (*), Parentheses (())

B.

Addition (+), Multiplication (*), Logical AND (&&), Parentheses (())

C.

Logical AND (&&), Multiplication (*), Addition (+), Parentheses (())

D.

Parentheses (()), Multiplication (*), Addition (+), Logical AND (&&)

E.

Logical AND (&&), Addition (+), Parentheses (()), Multiplication (*)

Correct option is A

In C, the order of precedence of operators from lowest to highest is as follows:
1. Logical AND (&&): Has the lowest precedence among the options listed.
2. Addition (+): Has a higher precedence than logical AND but lower than multiplication and parentheses.
3. Multiplication (*): Has a higher precedence than addition and logical AND, but lower than parentheses.
4. Parentheses (()): Has the highest precedence, as they are used to explicitly specify the order of operations.
Important Key Points:
1. Operator Precedence: Determines the order in which operators are evaluated in an expression.
2. Parentheses: Can override default precedence by explicitly specifying the order of operations.
3. Associativity: When operators have the same precedence, associativity determines the order of evaluation. For most operators, associativity is left to right. However, for assignment operators and the conditional operator (?:), it is right to left.
Knowledge Booster:
1. Understanding Precedence: Knowing the precedence of operators helps in writing expressions that are evaluated correctly without unexpected results.
2. Using Parentheses: To ensure the correct order of operations, use parentheses even when operator precedence might make it unnecessary. It enhances code readability.
3. Examples:
· Without Parentheses: 3 + 4 * 5 evaluates to 3 + (4 * 5) = 23.
· With Parentheses: (3 + 4) * 5 evaluates to 7 * 5 = 35.

Free Tests

Free
Must Attempt
Video Solutions

SBI Clerk Mains 2026 Full Mock Test-01

languageIcon English
  • pdpQsnIcon190 Questions
  • pdpsheetsIcon200 Marks
  • timerIcon160 Mins
languageIcon English
Free
Must Attempt

SBI Clerk Mains MBT (29th October 2026 S1)- Based on Backlog Vacancies

languageIcon English
  • pdpQsnIcon190 Questions
  • pdpsheetsIcon200 Marks
  • timerIcon160 Mins
languageIcon English
Free
Must Attempt

SBI Clerk Mains 2026 : Reasoning Section Test - 01

languageIcon English
  • pdpQsnIcon50 Questions
  • pdpsheetsIcon60 Marks
  • timerIcon45 Mins
languageIcon English
test-prime-package

Access ‘IBPS SO IT Officer’ Mock Tests with

  • 1.5 Lakhs+ Mocks and Previous Year Papers
  • Unlimited Re-Attempts
  • Personalised Report Card
  • 500% Refund on Final Selection
  • Largest Community
students-icon
592k+ students have already unlocked exclusive benefits with Test Prime!
Our Plans
Monthsup-arrow