title: How many ways are there to execute system command in C program for windows
body: <p>I am using MS visual studio 2008, for C coding.</p>
  
  <p>I know we can use
  "<code>int system(const char *command)</code>" to execute commands.</p>
  
  <p>Is there any other method to execute system commands in C program.
  Also I need to store output of executed command in a variable.</p>
  
  <p><code>system()</code> function execute command and send output to <code>stdout</code> , is there any way to read from <code>stdout</code> and store in variable.</p>
  
  <p>So my ultimate goal is to execute system command in C program for windows (using visual studio) and store output of that command in a variable.
  Any suggestions ?</p>