printf returns number of successfully printed characters.
so printf("10000\n") will return 6
and printf("c\n") will return 2
due to the extra '\n' character which is also being printed
I hope the output is now clearAnurag Sharma On Fri, Jun 11, 2010 at 12:26 AM, divya <[email protected]> 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]<algogeeks%[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.
