#include<stdio.h>
#include<sys/types.h>
int main()
{
int i,n;
pid_t pid;
printf(“enter the no of child\n”);
scanf(“%d”,&n);
pid=fork();
for(i=1;i<n;i++) { if(pid>0)
pid=fork();
}
printf(“my id is->%d and my parent id is -> %d\n”,getpid(),getppid());
return 0;
}