according to precedence m= ++i || ++j && ++k will become m = ++i || (++j && ++k); NOT this m = (++i || ++j) && ++k;
first i gets incremented and since that gives a non-zero value the rest of the statement is not executed. On Tue, Jun 14, 2011 at 8:41 PM, nicks <crazy.logic.k...@gmail.com> wrote: > anybody having idea about preference order ?? > > > On Tue, Jun 14, 2011 at 4:20 AM, nicks <crazy.logic.k...@gmail.com> wrote: > >> What about precedence order then..... >> http://www.difranco.net/cop2220/op-prec.htm i mean acc. to precedence >> order && should be evaluated before || in the second example....result >> should be k=1,j=3 and i= -2 >> >> >> On Mon, Jun 13, 2011 at 11:41 AM, udit sharma <sharmaudit...@gmail.com>wrote: >> >>> hmm. Sry yr... Got it.. Thanx.. :) :) >>> >>> -- >>> 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. >>> >> >> > -- > 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. > -- 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.