Sachin
BAN USER
Comments (3)
Reputation 0
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
This is how I got 20
A: fork();
B:fork() && fork() || fork()
C:fork();
A: fork() 2 processes (1 parent and 1 child)
B: fork() && fork() || fork() 4(both fork) + 4(both fork) + 2(only child do this fork) = 10 since this is a single execution statement we need add them
C: fork() 20
Comment hidden because of low score. Click to expand.
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
When a process execute fork() then we have two processes in total. If two processes fork() then we have 4 in total. Before B execution starts there are two processes.
- Sachin March 14, 2012