Computer Science, asked by anishdev255, 8 months ago

int a=4; int z=(a--) +(++a)-(a++); What is the value of z?

Answers

Answered by krishna7796
1

Answer:

For first a++ a value will be 10, and for next ++a a value will be changed to 11, and a value will be 12 for next ++a expression. Now a value is 12. So apply this value for over all expression (i.e) 12+12+12 so b will gets value 36. a will again changed its value to 13 because in above expression there is post increment (i.e) a++. Got my point.

Similar questions