title: How to send a variable between two C programs
body: <p>I have a C program, <code>xyz.c</code> which does some computations on a certain variable, say <code>transferme</code>. I want to transfer this variable/ pass this variable to another C program, say <code>jkl.c</code>. </p>
  
  <p>I have been trying to do the following:</p>
  
  <p><strong>Fork</strong> the xyz.c and use <strong>execvp()</strong> to pass this <code>transferme</code> to an executable of jkl.c [Turns out execvp will accept only paths to a binary executable or a shell script.]</p>
  
  <p>What is happening is,</p>
  
  <ol>
  <li><strong>execvp()</strong> does not transfer variables, it needs <code>const char *</code> to be the type of the argument.</li>
  <li>passing the path to the binary executable does not work. [I tried a simple forking and execvp, without trying to pass the variable.]</li>
  </ol>
  
  <p>Could anyone please:</p>
  
  <ol>
  <li>Tell me how to use <strong>execvp()</strong> here in this case? where the binary executable is in the home folder, say the path is <code>/home/user/jkl.o</code></li>
  <li>Tell me how to pass this variable to the other program?</li>
  </ol>
  
  <p>I tried looking into <code>pipe</code>, but I got more confused.</p>
  
  <p><strong>EDIT</strong>: I meant <code>jkl.out</code></p>