C expression with conditional & assignment operators

Example : Illustration of Indirect or Invisible If [ Click Here : Indirect If Statement ]

#include<stdio.h>
void main()
{
int a = 40 , b = 30 ,c;
c = !a<=!(c=b);
printf("%d",c);
}

Output :

1

How ?
Step 1 : 

  1. Always Solve Bracket First
  2. (c = b) : Assignment Operator Assigns value of RHS to LHS i.e Assigns value of b to c
  3. Replace “(c=b)” by 30
c = !a<=!30;

Step 2 :

  1. “Not” Operator has Higher Priority Than “<=” Operator.
  2. !a= !40 = 0
  3. Replace “!a” by “0″ as we calculated .
c = 0<=!30

Step 3 : 

  1. As “c = 0<=!30″ contain again Two Operands , Again scan Expression from we have now Two Operators “!” and “<=”.
  2. “Not” Operator has Higher Priority so
  3. !30 = 0
  4. Replace “!30″ by “0″
c = 0<=0

Step 4 :

  1. Obviously 0 <= 0 is True Condition
  2. Replace Whole Expression by 1
c = 1
  1. Thus C = 1