Yes, you are right mohit, the no of processes is indeed 20.
but the question asks for the no of new processes created, not the
total no of processes.
Hence, we subtract the initial process from the final ans, we get 19.,
which is the required answer...:-) :-)

On Sep 4, 11:10 pm, "MOHIT ...." <mohit...@gmail.com> wrote:
> Fork() && fork () || fork ();
> Fork return 0 in child process and non-zero in parent
> so in child process Fork()&& only executed not fork()||fork();(&& stop
> working if get 0 as previous input);
>
> if we get parent after parent only fork of (&& ) and initial fork of || get
> executed;(|| stops if one input is 1 next one not evaluated).
>
> if we get child after parent whole fork && fork()|| fork() get executed.
>
> but answer comes 20.
> plz correct me if i am wrong

-- 
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.

Reply via email to