Pre-increment and post-increment operators in C

#include <stdio.h>

int main(void) {
	int a=0, b=1, c=-8;
	int result=0;
	printf("1. a=%2d, b=%2d, c=%2d, result=%2d\n", a, b, c, result);
	result=8+a++;
	printf("2. a=%2d, b=%2d, c=%2d, result=%2d\n", a, b, c, result);
	b++;
	printf("3. a=%2d, b=%2d, c=%2d, result=%2d\n", a, b, c, result);
	result=++b+3;
	printf("4. a=%2d, b=%2d, c=%2d, result=%2d\n", a, b, c, result);
	++b;
	printf("5. a=%2d, b=%2d, c=%2d, result=%2d\n", a, b, c, result);
	return 0;
}

a++ post increment (it increments the value of a after the operation is over)

++b  pre increment (it increments the value of b before the operation)

The output is:

Pre-increment and post-increment operators in C