exactly what nithish has stated is the reason..as all the programming languages uses short circuit method of evaluation for the relational statements..as the right side expression of the 'or' is true..it doesn't evaluate the left side expression, because now the left side expression doesn't affect the logic answer, as the right side expression is true..
On 7/26/11, Nitish Garg <[email protected]> wrote: > This will be evaluated as i++ || (j++ && k++) as && gets the priority, so i > will get incremented to 2. As the left hand side of || is true, the result > is true and so the right hand side won't get evaluated. > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/algogeeks/-/Y5qsqzisV7gJ. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
