Sprno:9223
3A SYSTEM CALL BY FORK()
PROGRAM:
          #include <stdio.h>
      #include <unistd.h>
      #include <sys/types.h>
      int main()
      {
           pid_t pid;
           pid = fork();
           if (pid < 0)
           {
               perror("Fork failed");
               return 1;
           }
           else if (pid == 0)
           {
               printf("Child Process: PID = %d, Parent PID = %d\n", getpid(), getppid());
           }
           else
           {
               printf("Parent Process: PID = %d, Child PID = %d\n", getpid(), pid);
           }
           return 0;
      }
OUTPUT:
      Parent Process: PID = 30310, Child PID = 30311
     Child Process: PID = 30311, Parent PID = 30310