int main()
{
fork();
fork();
fork();
printf("BOOM \n");
return 0;
}

How many BOOMs will be printed ?

Click for Solution

  • Warning: Illegal string offset 'name' in /home/prepdo6/gpl4you/discussquessub.php on line 681
    A its (2^n)-1


  • Warning: Illegal string offset 'name' in /home/prepdo6/gpl4you/discussquessub.php on line 681
    A 8 times .


  • Warning: Illegal string offset 'name' in /home/prepdo6/gpl4you/discussquessub.php on line 664

  • Warning: Illegal string offset 'name' in /home/prepdo6/gpl4you/discussquessub.php on line 682
    N i think boom will get printed 8 times as we call d fork system call 3 times
    and 2 raise to power number of fork call is equal to creation of duplicate process

[Insert Code]