What is difference between pre increment and post increment?

Answer:
An example might help:

int a, b;

a= 2;
b= a++;
/* now a=3, b=2 */

a= 2;
b= ++a;
/* now a=3, b=3 */
First answer by NevemTeve. Last edit by NevemTeve. Contributor trust: 172 Question popularity: 1 [recommend question].