The Gateway to Computer Science Excellence
0 votes
Including the initial parent process, how many processes are created by the program shown below-

#include <stdio.h>
#include <unistd.h>
int main()
int i;
for (i = 0; i < 4; i++)
return 0;
in Operating System by Boss | 54 views

1 Answer

0 votes

Total number of child process are created = $2^n$-1.

Here for loop executed 4 times( n=4) .

Total number of child process are created = $2^4$ -1 =16-1 = 15.


by Boss
edited by

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
52,217 questions
59,906 answers
118,144 users