Fork function calling .. print the output


#1
#include<sys/types.h>

Int main()

{

Fork();

Fork();

Fork();

Fork();

Fork();

Fork();

Fork();

Print(“HELLO”/n);

Return 0;

}
  1. 2^7
  2. 2^6
  3. 2^8
  4. None of these

#2

The number of times the print function shows the output is dependent on the number of processes that are created . Output will be 2^n where n is number of processes.
In this particular question we have 7 fork(); processes.
So, hello will be printed 2^7 times.