generate a c/c++ code snippet for desired no. of processes to create using fork() system call
test by placing fork-logic output inside test.c
eg.
$ ./fork-logic 99
pid_t p;
if((p=fork())==0){
fork();
if((p=fork())==0){
fork();
fork();
fork();
fork();
if((p=fork())==0){
fork();
}
}
}