Computer Science, asked by Harshi666, 1 year ago

why does the value of a++ still remain as 4 and not 5 in this problem??

Attachments:

Harshi666: wow.... thanks.. i got it

Answers

Answered by Anonymous
1

Because ++ is written after the variable and if it is written after the variable the value remains the same if it ++ is before the value changes


Harshi666: what about u??
Harshi666: and btw are u accurate about ur ans??
Anonymous: Haa bolo jaanu
Anonymous: Aajke baad karoge gussa hum par
Anonymous: I love you so much
Anonymous: Meri jaanu
Answered by Anonymous
2

Hi,

because .. ++ first does evaluation and then incriments it, that's why value of a remain same.

Similar questions