Increment/Decrement Operator with example.
int main(){
int i=10,j;
j=++i;
printf("%d\n",j,i);
j=i++;
printf("%d\n",j,i);
}
$ gcc test.c
./a.out
11 11
11 12
int main(){
int i=10,j;
j=++i;
printf("%d\n",j,i);
j=i++;
printf("%d\n",j,i);
}
$ gcc test.c
./a.out
11 11
11 12
No comments:
Post a Comment