-6

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)

Butiri Dan
  • 1,759
  • 5
  • 12
  • 18
  • 3
    SO is not a site to do your homework for you. Tell us what you have tried to solve the question and where you are stuck. – jBuchholz Aug 26 '19 at 11:00

1 Answers1

0

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.