811 views
0 votes
0 votes

On Solving  manually  I too getting 14 as answer.

 

but on running more than 14 * are printed.

2 Answers

1 votes
1 votes
bcoz not possible to determine order of fork() execution it’s cpu scheduling dependent
edited by
1 votes
1 votes

For the child processes pid=0 hence the star in the conditional operator won’t be printed

Related questions

3 votes
3 votes
1 answer
1
1 votes
1 votes
2 answers
2
♥_Less asked Jan 12, 2018
1,747 views
What is the number of child process created ?Answer given was 63, BUT i am getting 9 !
0 votes
0 votes
2 answers
4
Pavan Shetty asked Nov 24, 2018
1,746 views
A process executes the following segment of code:int main() { fork(); fork() && fork();}The number of new processes created is __________Can someone pls explain...