// C program to demonstrate working of wait()
#include<stdio.h>
#include<sys/wait.h>
#include<unistd.h>
int main()
{
if (fork()== 0)
printf("HC: hello from child
");
else
{
printf("HP: hello from parent
");
wait(NULL);
printf("CT: child has terminated
");
}
printf("Bye
");
return 0;
}