+ 2
Incremento decremento
Alguien me puede explicar el incremento y el decremento
12 Antworten
0
Yeah!! It assign 10 to y and gets modified itself after as 11...
I couldn't send the screenshot, otherwise I will
+ 1
Hay Carlos Miguel Perez Adan just use English here as everyone understands same .
We respect all languages but it is not possible for us to learn all .
So please use English language
0
could someone help me understand the increase and decrease
0
Hii, carlos Pérez Adán...
Si entiendes inglés, puedo ayudarte... porque no sé español
0
sarada lakshmi I would like you to help me understand the ++ y --
0
Yeah!! Increment and decrement are two types
1.pre increment
2.post increment
In pre increment, incrementation done first and the other operations done next.. And the post increment is vice versa..
For ex,
x=10
y=++x //11
z=x++ //10
Here,why the y value is 11 means, first the x gets incremented and then assignment is done... And why the z value 10 means, first the assigning done first and the incrementation done next...
But,In both the cases, the value of x gets changed to 11..
Coming to decrement operators.. It's also two types
1. Pre decrement
2. Post decrement
These two also works same as above.. But, the value gets decreased in this case..
For ex,
x=10
y=--x //9
z=x-- //10
But,in both the cases the value of x gets decreased..
0
Hope it'll help you 👍 Otherwise, feel free to ask me anything...
0
example: x = 10; y = x ++; results: x = 10 y = 10 x = 11
0
No, y results in 10..coz,its post increment know.. So, other operations are done first and incrementation done next... So, first value of x is assigned to y and then internally incrementation was done
0
you mean that and have a value of 10 until it goes to the next line there it will be 11 when is y = x ++;
0
your question given here is interesting. ill cant help you.
p.s. I cant understand the question.
Please use Google Translate.