title: initializing char array with spaces
body: <p>I want a 20 character NULL('\0') terminating string filled with white spaces. </p>
  
  <p>Currently I am doing it in following way</p>
  
  <pre><code>char foo[20];  
  for (i = 0; i &lt; num_space_req; i++)        //num_space_req &lt; 20  
  {  
      foo[i] = ' ';  
  }
  
  foo[num_space_req] = '\0';
  </code></pre>
  
  <p>Is there a better way for above?</p>