Skip to content
Question Bank (5 marks) · Q7

Q.If a = 25 and b=6, find

(i) a+b
(ii) a-b
(iii) a*b
(iv) a/b
(v) a%b
(vi) -a%b
(vii) a%-b
Karnataka PUCTextbookNumeric· 5mImportance★★★★★est
25% · 38/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]

For integers a = 25, b = 6: a+b=31, a-b=19, a*b=150, a/b=4, a%b=1, -a%b=-1, a%-b=1.

Since a and b are integers, / gives the whole-number quotient (the fractional part is discarded) and % gives the remainder. In C the result of % takes the sign of the dividend (the left operand). Evaluating each:

  1. a + b = 25 + 6 = 31.
  2. a - b = 25 - 6 = 19.
  3. a * b = 25 * 6 = 150.
  4. a / b = 25 / 6 = 4 (integer division; the .1666... is discarded).
  5. a % b = 25 % 6 = 1 (remainder of 25 divided by 6). …

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.