Code:
if (a>b && c>d)
{
e=100;
}
this means both have to evauluate to true for the code blocks within the expression to happen (e get the value of 100 loaded into it)
If b is greater than a or d is greater than c the if will evalute to false and e will keep its original value.
Code:
if (a>b || c>d)
{
e=100;
}
Ok this one mean either one or the other has to evauluate to true
if b is greater than a and d is actually less than c then it will result in a true result.
Code:
if ((!(a>b) && c<d) || a>b)
I guess you may ask about this later. That "!" really can get confusing.
Also as a note in your code && isnt the first to execute
"m=++i && ++j || ++k;"
expressions like this are done from right to left. Not left to right
You wouldn't use logical operators like this.
Code:
main()
{
int i=-3,j=2,k=0,m;
m=++i , ++j , ++k;
printf("%d %d %d %d",i,j,k,m);
}
You code returns a result but I dont think its what you want is it?
I got -2,3,0,1 the way you did it and
I got -2,3,1,-2 the way I did it.