Skip to content
Question Bank (3 marks) · Q16

Q.Briefly explain operator precedence in C.

Karnataka PUCTextbookShort· 3mImportance★★★★★est
53% · 82/154 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

[!TLDR]

Precedence fixes which operators are evaluated first in an expression; associativity resolves ties, and ( ) can override both.

When an expression contains more than one operator, C evaluates them in a definite order decided by operator precedence:

  1. Operators with higher precedence are evaluated before those with lower precedence. For example, in a + b * c the multiplication is done first because * has higher precedence than +.
  2. The usual arithmetic order is: unary (+, -, ++, --) highest, then * / %, then + -, then relational, then logical, then assignment.
  3. When two operators have the same precedence, associativity (usually left-to-right) decides the order. …

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.