Since test condition will always evaluate to non-zero value (which is considered true in c/c++) hence always first option get selected ....
On 8 August 2011 17:44, Shachindra A C <sachindr...@gmail.com> wrote: > oops...I'm sorry.. the statement would evaluate to 3 + *0* ? 2 : 3 ==> *3*? 2 > : 3 ==> m = 2. > > > On Mon, Aug 8, 2011 at 5:43 PM, Shachindra A C <sachindr...@gmail.com>wrote: > >> @raj, >> the preprocessed file would contain m=3+(2>3)?2:3 AFAIK. >> >> So, the statement would evaluate to 3 + 1 ? 2 : 3 ==> 4 ? 2 : 3 >> ==> m = 2. >> >> Likewise for n. >> >> >> On Mon, Aug 8, 2011 at 5:21 PM, raj kumar <megamonste...@gmail.com>wrote: >> >>> 3+2>3?2:3 >>> so 5>3 hence 2 is returned bcoz of higher precedence of + over ? >>> Thanks >>> >>> -- >>> 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. >>> >> >> >> >> -- >> Regards, >> Shachindra A C >> >> > > > -- > Regards, > Shachindra A C > > -- > 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. > -- *Dilip Makwana* VJTI BTech Computers Engineering 2009-2013 -- 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.