--- In [email protected], ed <[EMAIL PROTECTED]> wrote: > > On Sat, 19 Jul 2008 12:32:23 -0000 > "John Matthews" <[EMAIL PROTECTED]> wrote: > > > --- In [email protected], Thomas Hruska <thruska@> wrote: > > > > > > kathir resh wrote: > > > > since printf is function it returns the no of characters > > > > printed...how to view the no of charaters it returns..... > > > > > > printf("%d\n", printf("Hi!\n")); > > > > Slight variation: > > > > printf("%d\n", printf("no of characters = ")); > > > > How do you know when flush is called? It could be after the nested > function, although it should happen after writing \n, it's possible for > it to happen before the outer printf I believe.
Sorry Ed- not sure I understand. Does it matter when the flush happens, as long as the characters go into the output stream in the expected order ie. inner before outer? And isn't that guaranteed by the inner printf having to be evaluated before the outer executes? To be honest I wasn't sure myself whether this 'nesting' of printfs is ok, but if Thomas thinks it is, that's good enough for me :-) John
