what is the output of this and explain how it works?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

what is the output of this and explain how it works??

int main() { int a=-5; int k=(a++,++a); printf("%d",k); return 0; }

14th Oct 2020, 7:24 AM
mohana hemanth
mohana hemanth - avatar
1 Answer
0
You can understand this only by practicing. It's confusing for all begginers. First read about pre-increment and post-increment then try making some practice code. Just observe the outputs carefully.
14th Oct 2020, 9:16 AM
Kashyap Kumar
Kashyap Kumar - avatar