search in group archive, this question has been discussed very deeply On 14 August 2011 23:14, sivaviknesh s <[email protected]> wrote:
> > http://faq.programmerworld.net/networking/unix-interview-questions-answers.html > > refer 16 th ques in this site .. they ve told 2^n times..so only i asked > whether its compiler dependent ?? > > > On Sun, Aug 14, 2011 at 11:12 PM, sivaviknesh s <[email protected]>wrote: > >> int main() >> { >> fork(); >> fork(); >> fork(); >> printf("Hello world!"); >> } >> >> ...this will print hello world 8 times...i.e . 2^n times.... >> >> but... >> >> int main() >> { >> fork(); >> fork(); >> fork(); >> fork() >> printf("Hello world!"); >> } >> >> http://ideone.com/TRKTE >> >> ..but this prints only 11 times >> -- and for five forks 25 times...plz tell how..or is this a prob wit >> compiler??? >> Regards, >> $iva >> >> > > > -- > Regards, > $iva > > -- > 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. > -- ___________________________________________________________________________________________________________ Please do not print this e-mail until urgent requirement. Go Green!! Save Papers <=> Save Trees -- 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.
