The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
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;
asked in Operating System by Boss (41k points) | 34 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.


answered by Boss (34.2k points)
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
49,814 questions
54,520 answers
75,319 users