The following C program is executed on a Unix/Linux system :
for(i=0; i<10; i++)
if(i%2 == 0)
The total number of child processes created is ________________ .
check all the links one by one in the order which are in the comment
5(0,2,4,6,8) times fork is called.
Total number of child process would be 2'5−1=31
Answer is $31$
Fork is called whenever $i$ is even, so we can re-write the code as
for(i=0; i<10; i=i+2)
fork() will be called 5 times($i=0,2,4,6,8)$
$\therefore$ Total number of process $2^5=32$
Total number of child process would be $2^5−1=31$