#include<stdio.h>
#include<unistd.h>
main()
{
    int pid,i=0;
    pid=fork();
    if(pid==0)
    {
        printf("\n child process started");
        for(i=0;i<10;i++)
        printf("\n%d",i);
        printf("\nchild process ends");
    }
    else
    {
        printf("\nparent process starts");
        wait(0);
        printf("\nparent process ends");
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: