#include<stdio.h>
int main()
{
 int i=0,j=1,k=1,z=0;
 z = j || k  && i ;
 printf("%d",z);
 return 0;
}

The output is 1 for the above program .

But according to associativity of logical operators , the evaluation
should be from left to right , But is it taking from right to left ?
What is the exact concept for the program behavior above?

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to