title: Can we pass variables as commandline arguments in execvp() in c
body: <p>Can anyone please let me know 
  Whether we can pass variables as commandline arguments to execvp() in c or not.
  If so,how to pass?
  Is there any other way to pass variables while calling executable?</p>
  
  <p>My code snippet is</p>
  
  <pre><code>struct sample
  {
      int links[100],nodes[100],hosts[100],linkcount,nodecount,hostcount;
  };
  
  int main() 
  {
      pid_t process;
      struct sample s1;
      //assigned values to all the structure members.
       const char* command ="./abc";
      process=fork();
      if(process &lt; 0)
      {
          perror("fork failure");
          exit(1);
      }
      if(process == 0)
      {
          execvp(command,NULL);/*Can I pass entire structure as commandline argument in execvp(command,&amp;s1,NULL)*/
      }
      else
      {
          wait(NULL);
          printf("child is dead..parent process is resuming"); 
       }
       return 0;
  }
  </code></pre>