+ 1
WHAT IS THE meaning of y=-x++
WHAT IS THE meaning of y=-x++
2 Answers
+ 3
- (minus) sign is for making the output negative
x++ is used for incrementing the value of x by 1. But it is post increment operation, it won't make any difference in the value of y. x will increase by 1.
Example:
x=1;
y=-x++;
print(y); //output => -1
print(x);. //output => 2