Difference between i++ and ++i Most of us struggle with these two while finding the output of C programs. i++ works follows: First the value of i will be used and the value will be incremented Code: i=1; j=i++; ans:i=2,j=1. In case of ++i: The value of i will be increased first then it'll be used. Code: i=1; j=++i; ans:i=2,j=2. Hope above information will be helpful for the beginners.