C/Language Basics/Operator Self Increase
Self increase and decrease operator
#include <stdio.h>
int main(void) {
int i;
i = 0;
i++;
printf("%d ", i);
i--;
printf("%d ", i);
return 0;
}
Self increase operator
#include <stdio.h>
int main(void)
{
int i, j;
i = 1 ;
j = i++;
printf("i = %d j = %d", i, j);
return 0;
}
Self operator
#include <stdio.h>
int main(void)
{
int a, b;
a = 1;
a++;
b = a;
b--;
printf("%d %d", a, b);
return 0;
}