The only gurantee in this is that the outer printf result will come first. Why ? because comma operator does not act as sequence point.
-Arun prasath N On Sat, Jun 12, 2010 at 3:44 PM, divya jain <sweetdivya....@gmail.com>wrote: > thanks to all for explanantions :) > > > On 12 June 2010 15:43, divya jain <sweetdivya....@gmail.com> wrote: > >> one of my frnd askd me this question... >> >> >> On 11 June 2010 21:34, Raj N <rajn...@gmail.com> wrote: >> >>> @kirubakaran: How can it be 1,1 ? No of characters read in a is 5+ 1 for >>> '\n' so its 6 and for the next one 1+1=2 >>> >>> >>> On Fri, Jun 11, 2010 at 9:09 AM, kirubakaran >>> <kirubakaran1...@gmail.com>wrote: >>> >>>> Output will be >>>> >>>> 1,1 >>>> bcoz printf returns number of characters or integers printed >>>> >>>> On Jun 11, 12:26 am, divya <sweetdivya....@gmail.com> wrote: >>>> > #include <stdio.h> >>>> > main() >>>> > { >>>> > int a = 10000; >>>> > char b='c'; >>>> > int i,j; >>>> > >>>> > printf("%d,%d",printf("%d\n",a),printf("%c\n",b)); >>>> > >>>> > wat shd b the o/p of this..plzz explain y? >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Algorithm Geeks" group. >>>> To post to this group, send email to algoge...@googlegroups.com. >>>> To unsubscribe from this group, send email to >>>> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@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 algoge...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@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 algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@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 algoge...@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.