0
Can someone explain me this? Cause i dont understand it
8 Réponses
+ 12
it means :
x = x+x+6
+ 12
when you type x = 10
you assign 10 to x.
and when you type x += 10
this means add 10 to the current value of x.
//now x = 20
+ 1
x = 1;
here x is variable and it's value is 1
x +=5;
here += will add 5 to x, that means x is 6. That's not a big issue bro 😊
0
An operator is a symbol that tells the compiler to perform specific mathematical or logical manipulations.
0
yeah but i dont understand this "x+=x+6" and that stuffs
0
thanks !!
0
one last thing. i yave doubts with the prefix and the postfix (++×; and ×++;)
0
x++ will produce the value then update (increment) and ++x will update then then produce the value
example:
x = 1
y = x++
here x is 2 and y is 1 but
x = 1
y = ++x
here x is 2 and y is 2