When I use the following method to input numbers, it is seen that the compiler /linker takes 11 inputs from the user.
for(i=0;i++;i<10)
scanf("%d", &a[i]);
However when i use the following way to scan the numbers, it is seen that the compiler/linker behaves as expected. i.e 10 inputs are taken from the user.
i=10;
while(i--)
scanf(""%d", &a[i]);
My question, is why the disparity. Why does the user have to input 11 numbers, despite running the loop 10 times.