title: execvp() system call not executing
body: <pre><code>char *args[41];
  char str[41], teststr[41];
  const char delimiter[2]=" ";
  memcpy(teststr, str, sizeof(str));
  args[i]=strtok(teststr, delimiter);
  while(args[i]!=NULL)
  {
      printf("args[%d]=%s\n", i, args[i]);
      i++;
      args[i]=strtok(NULL, delimiter);
  }
  </code></pre>
  
  <p>This is a code I used to intialize args[].</p>
  
  <p>Below code is to execute execvp() system call.</p>
  
  <pre><code>pid=fork();
  if(pid==0)
  {
      execvp(args[0], args);
  }
  </code></pre>
  
  <p>When I run the code, execvp runs few commands. Such as when I try to execute 'ls' command, it will work but when I try to run 'date' command or 'cd' command, it does not work. And when I try to execute 'cat' command, prompt does not show anything and at the same time it does not come out of it.</p>