Explain how(-5,-4) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Explain how(-5,-4)

Second line of the code

1st Mar 2020, 6:58 AM
Ajith
Ajith - avatar
5 Answers
0
int a=-5; int k=(a++,++a); Printf("%d",k);
1st Mar 2020, 7:00 AM
Ajith
Ajith - avatar
0
Help me wizards
1st Mar 2020, 7:00 AM
Ajith
Ajith - avatar
0
The answer is -3
1st Mar 2020, 7:19 AM
Ajith
Ajith - avatar
0
Thanks
1st Mar 2020, 7:31 AM
Ajith
Ajith - avatar
0
The answer is -3. a++ would leave it as -5, but while it gets to ++a it would turn into -4 and then it would turn into -3 because of ++a.
1st Mar 2020, 10:48 AM
Prof
Prof - avatar