@Siddharam: Presumably you meant int a=10,b=20. But the next statement violates the sequence point rule, which says that no variable can be assigned more than one value between sequence points. As such, the program is non-standard, and the results are undefined. Google can find you additional details about the sequence point rule.
Dave On Aug 25, 11:05 pm, siddharam suresh <siddharam....@gmail.com> wrote: > gives an error as b is undeclared. > BTW this prog swaps 2 number. > > Thank you, > Siddharam > > On Fri, Aug 26, 2011 at 9:28 AM, SuDhir mIsHra > <sudhir08.mis...@gmail.com>wrote: > > > > > main() > > > { > > > int a=10,20; > > > a^=b^=a^=b; > > > printf("%d\n %d\n",a,b); > > > -- > > 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.- Hide quoted text - > > - Show quoted text - -- 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.