+ 1
C program.....can anyone tell me how this program works line by line?
Why is i = a[i++]....after execution of that line i = 0? https://code.sololearn.com/c1XboMPEVTKq/?ref=app
1 ответ
+ 1
Anything that has i on the left hand side and something like i++ or ++i on the right hand side of an equation leads to undefined behavior.
i++; // correct
x = i++; // correct
i = i++; // wrong
i=a[i++]++; // also wrong