
/* include header files */

#include <stdio.h>       // printf
#include <stdlib.h>      // exit
#include <unistd.h>      // sleep, getpid, fork
#include <sys/types.h>   // getpid, fork

/* main function */

int main(){         
  
  if ( fork() == 0) { 
    
    /* child section */
    
    printf("Child: I am an orphan\n"); 
    sleep(30);
    exit(7);
  }
  
  /* parent section */
  
  printf("Parent: execution completed\n");
  
  return 0;
}

