We can simplify the code by opening the loop:-
int main (void) {
fork( );
fork( );
fork( );
fork( );
printf (“GOCLASSES”);
Now,we no total no of processes= 2 ^ n where n = no of forks
Therefore total processes= 2 ^ 4 = 16 thus GoClasses will be printed 16 times