Q&A ICSE2017-03B #7233
Question:
What is the value of x1 if x=5?
x1= ++x – x++ + –x
Answer:
x1=++x – x++ + –x
x1 = 6 (x is incremented to 6) – 6 (x is incremented to 7) + 6 (x is decremented to 6)
= 6
What is the value of x1 if x=5?
x1= ++x – x++ + –x
x1=++x – x++ + –x
x1 = 6 (x is incremented to 6) – 6 (x is incremented to 7) + 6 (x is decremented to 6)
= 6