@sagar: Thanx a lot
On Tue, Aug 9, 2011 at 12:15 AM, sagar pareek <[email protected]> wrote:
> *
> void main() {
>
> int p1= fork();
>
> if (p1 == 0) {
>
> int p2 = fork();
>
> if (p2 != 0) {
>
> fork();
>
> }
>
> }
>
> }
>
> for confirmation just make a diagram
>
>
> M
> / \
> / \
> M C1 --------> fork() 1st
> M>0 and C1==0
> / \
> / \
> / \
> C1 C2 ----------> fork()
> 2nd C1>0 and C2==0
> / \
> C1 C3 -----------> fork()
> 3rd
> *
>
>
> On Tue, Aug 9, 2011 at 12:04 AM, aditi garg <[email protected]>wrote:
>
>> well since i have told u i dont knw OS too well so i ws nt sure...bt if
>> suppose the condition (p1==0) is false thn only 1 child will be created??
>>
>>
>> On Mon, Aug 8, 2011 at 11:56 PM, ankit sambyal <[email protected]>wrote:
>>
>>> @aditi : the ans is 3. Why do u think there is no definite ans ?
>>>
>>> --
>>> 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.
>>>
>>
>>
>>
>> --
>> Aditi Garg
>> Undergraduate Student
>> Electronics & Communication Divison
>> NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
>> Sector 3, Dwarka
>> New Delhi
>>
>>
>> --
>> 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.
>>
>
>
>
> --
> **
> Regards
> SAGAR PAREEK
> COMPUTER SCIENCE AND ENGINEERING
> NIT ALLAHABAD
>
> --
> 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.
>
--
Aditi Garg
Undergraduate Student
Electronics & Communication Divison
NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
Sector 3, Dwarka
New Delhi
--
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.