This is My Code:
int main()
{
int i=2,j=2,c=2,d;
d= ++i || ++j && c;
printf("I is %d\n",i);
printf("J is %d\n",j);
printf("C is %d\n",c);
printf("D is %d\n",d);
return 0;
}
The output of the following code is:
i is 3
j is 2
c is 2
d is 1
Now my question is, if ++i
is 3
then why ++j
is 2?
What is the difference between ++i
& i++
? Also I want to know that how come d
is 1
?