The Question is
if c=12;
c=c++ + ++c;
what will be the working solution for this?
like how would it be ex(12+13)something like this
please specify what would be (c++
)and what would be (++c
)
The Question is
if c=12;
c=c++ + ++c;
what will be the working solution for this?
like how would it be ex(12+13)something like this
please specify what would be (c++
)and what would be (++c
)
if c=12 then c++ + ++c is 12 + 14 = 26, so 26 will be assigned to c. First the c++ is evaluated to 12 and then 13 is assigned to c. Then ++c first assigns 13+1 is 14 to c and results in 14. So we have 12 + 14 which is the result of the expression and is assigned to c again.