145k views
1 vote
Assume the number variable contains the number 1000.

What value will be in the number variable after the preceding code is processed?



A.0

B.1000

C.2000

D.3000

1 Answer

4 votes

Answer:

Step-by-step explanation:

We could get the four options for this particular example, but we must know what happens with the variable number the value 1000.

In this case, we are going to assume four scenarios:

1) n = n - n this is equal to 0

2) n = (n - n) + n = 1000

3) n = n * 2 = 2000

4) n = n * 3 = 3000

These are simple examples, we could get these options in different ways.

User Scphantm
by
2.9k points