Increament and Decrement in C
#include <stdio.h>
int main()
{
int a = 4;
printf("The value of a before execution %d\n", a++);
printf("The value of a after execution %d\n", a);
printf("The value of a before execution %d\n", ++a);
printf("The value of a after execution %d\n", a);
printf("The value of a before execution %d\n", a--);
printf("The value of a after execution %d\n", a);
printf("The value of a before execution is %d\n", --a);
printf("The value of a after execution is %d\n", a);
return 0;
}
Comments
Post a Comment