Machine-translated by Google. Questions are authored in English.
Top

Discussion

Which of the following is not an arithmetic operation?

  • A.a *= 20;
  • B.a /= 30;
  • C.a %= 40;
  • D.a != 50;

Answer: D

Correct answer: a != 50;

!= is a relational operator: it compares and yields 1 or 0, and does not modify a at all. The other three are compound assignment operators - a *= 20 means a = a * 20, and likewise for /= and %=.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.