📅  最后修改于: 2022-03-11 15:04:36.794000             🧑  作者: Mango
intmain()
{
inti = 48, pid = -1;
pid = fork();
if (pid == -1)
{
printf ("Fork failed\n");
i++;
exit (1);
}
if (pid == 0)
{
printf ("In child process\n");
printf ("Printing current working directory using execlp system call\n");
i++;
}
else
{
printf ("In parent process\n");
printf ("Name: MAMOONA ASIF\n");
printf ("Roll No: MC180402471\n");
printf ("Program: MIT\n");
i++;
}
}