QuestionQ209

Using Operators and Decision Constructs

Given the following:

Question Image

What is the output?

  • A 10 : 30 : 6
  • B 10 : 22 : 22
  • C 10 : 22 : 20
  • D 10 : 22 : 6
Explanation

The expression j += i updates j from 20 to 30 before the division occurs. Dividing 30 by 5 assigns 6 to k, while i remains 10.

Community Discussion

No comments yet. Be the first to start the discussion!