title: Trying to understand the behaviour of execlp in a for loop
body: <pre><code>main(int argc,char **argv)
  {
      int i;
      for(i=1;i&lt;argc;i++)
      {
          execlp(argv[i],"",NULL);
      }
  }
  </code></pre>
  
  <p>I want to execute multiple commands concurrently from the command line input. 
  so, in the command line i have given <code>./a.out date &amp; cal &amp; pwd &amp; ls</code></p>
  
  <p>In the output, i could execute all the commands concurrently. </p>
  
  <p>But when i call execlp for the first time, it should take the first argument i.e., argv[1], and should replace the whole process by process-date and should terminate the whole process after its execution. But if it terminates then how come it is able to continue the for loop again ??</p>