title: uninitialized DWORD variable give random value?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1225788/uninitialized-values-being-initialized">Uninitialized values being initialized?</a>  </p>
  </blockquote>
  
  
  
  <pre><code>void Encrypt( FileContent *pFile )
  {
      /* Get the key total ascii value */
      DWORD asciiKeyValue;
  
      for (DWORD i=0; i &lt; pFile-&gt;keyLength; i++)
      {
          asciiKeyValue += pFile-&gt;encKey[i];
      }
  
      _tprintf(_T("[*]DEBUG The encKey ascii value is: %ld\n"), asciiKeyValue);
  }
  </code></pre>
  
  <p>I am get an out put of <code>430</code> when <code>DWORD asciiKeyValue</code>, but once <code>DWORD asciiKeyValue = 0</code> is <code>230</code> which is as it should be.</p>
  
  <p>Somebody has an explanation for that? Is the <code>asciiKeyValue</code> variable get a random value when it hasn't assigned an explicit value ?</p>