title: initializing a structure array using memset
body: <p>gcc 4.4.4 c89</p>
  
  <p>I have the following structure.</p>
  
  <pre><code>struct device_sys
  {
      char device[STRING_SIZE];
      int id;
      char category;
  };
  
  int main(void)
  {
      struct device_sys dev_sys[NUM_DEVICES];
  
      memset(dev_sys, 0, (size_t)NUM_DEVICES * sizeof(dev_sys));
  
      return 0; 
  }
  </code></pre>
  
  <p>I get a stack dump when I call memset. Is this not the correct way to initialize an structure array?</p>