if y=3 x=(y++)+(++y)*2+(++y)+y
Attachments:
Answers
Answered by
1
x=(y++)+(++y)*2+(++y)+y
Y++ =it use current value 3 then change it to 4.now current value of y is 4.
++y it change the current value that is now 4 to 5, then it use 5. now current value of y is 6.
Again
++y it change the current value that is now 5 to 6, then it use 6.
now current value of y is 4.
On putting value we get,
X= 3 + 5 *2 + 6 +6
X= 3+10+12
X = 25
Explantion.
Y++ is an postfix increment operator. Its rule is use then change means it use the current value then it add +1 to current value.
++y is prefix operator, it change then use means firstly it change( add +1)the value then use the changed value.
dasy31:
Please mark it brainly.
Similar questions
Science,
6 months ago
English,
6 months ago
Math,
1 year ago
World Languages,
1 year ago
Math,
1 year ago