title: what is the variable type of PID in PROCESS SYSTEM CALL?
body: <blockquote>
    <p>this is the part of the code for creating child process </p>
  </blockquote>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;stdlib.h&gt;
  #include&lt;unistd.h&gt;
  #include&lt;sys/types.h&gt;
  
  main()
  {
    pid_t pid;
  </code></pre>
  
  <blockquote>
    <p>pid_t was declared as the variable of pid.But values are same like integers. </p>
  </blockquote>
  
  <pre><code>  int x = 5;
    pid = fork();
  </code></pre>
  
  <blockquote>
    <p>fork() is the function which create child process.</p>
  </blockquote>
  
  <pre><code>  x++;
  
    if(pid&lt;0)
    {
      printf("process creation error");
      exit(-1);
    }
    else if(pid==0)
    {
      printf("Child Process");
      printf("\nChild Process ID is %d",getpid());
  x++;
      printf("\nValue of X is %d",x);  
      printf("\nProcess id of parent is %d",getppid()); 
    }
  </code></pre>