What is the value of x1 if x=5?
<span class="pln">
x1</span><span class="pun">=</span><span class="pln"> </span><span class="pun">++</span><span class="pln">x </span><span class="pun">–</span><span class="pln"> x</span><span class="pun">++</span><span class="pln"> </span><span class="pun">+</span><span class="pln"> </span><span class="pun">--</span><span class="pln">x</span>

Views 32

Answer:

    x1 = ++x – x++ + --x
⇒ x1 = 6 - 6 + 6
⇒ x1 = 0 + 6
⇒ x1 = 6

Related Articles:

This section is dedicated exclusively to Questions & Answers. For an in-depth exploration of Java Programming Language, click the links and dive deeper into this subject.

Join Our telegram group to ask Questions

Click below button to join our groups.