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