# difference between two expression given below

assume x=5,y=5;

x*=3+5;

y=y*3+5;

answered Sep 3, 2019 by anonymous
x*=3+5 will become x=x*(3+5) which will be x*8 = 40

where y=y*3+5 will be solved by BODMAS = 20
commented Sep 11, 2019 by (110 points)
distint and clear
answered Sep 3, 2019 by remember me
for first expression is short end it can also written as x=x*(3+5)

for second it is multiplication  of   var y with 3 and then adding it to 5
+1 vote
answered Sep 3, 2019 by anonymous
Using order of Operator Precedence

x*=3+5        //x=5*(3+5)

y=y*3+5      //y=y*3+5

answered Sep 10, 2019 by (140 points)
both are same
answered Sep 11, 2019 by anonymous
first one is x= x*(3+8);//x*=3+5 *= is compound operator

second one is y = y*3+5
answered Sep 12, 2019 by (180 points)
x*=3+5;      ==>    x = x*(3+5)    ==>   40

y=y*3+5;   ==>    y = (y*3)+5    ==>  20

Now you can see the exact difference.
+1 vote
answered Sep 18, 2019 by anonymous
*= is a compound operator

+, * , - , / are operators

x *= 3 + 5 can be written as x = x * (3 + 5).Here we need to consider BODMAS rule. So, output is  40

y = y * 3 + 5 ==> output is 20