CBSE Class 11 Informatics Practices Question 3 of 40

Practice Paper — Question 3

Back to all questions
3
Question

Question 3

If the value of a = 10 and b = 15, then a *= b will assign ............... to the variable a.

  1. 25
  2. 150
  3. 100
  4. 225
Answer

150

Reason — The operator *= is a shorthand for multiplying and assigning a value. So, a *= b means a = a * b. Given a = 10 and b = 15, the expression evaluates to a = 10 * 15, which results in a = 150.