title: Why am i getting exremely large numbers when adding elements of an array in c++?
body: <p>I was trying to add the first 4 numbers of my array. When I test it I always get the number &quot;4201077&quot; even though the first numbers 4 numbers are 1 2 3 and 4. When I try with different numbers starting, I get a slightly different variation such as &quot;4201092&quot;.
  What am I doing wrong?
  code:</p>
  <pre><code>int main(){
     int a [10];
     int count;
  
  
     for (int i = 0; i &lt; 10; i ++)
         cin &gt;&gt; a[i];
  
     int i = 0;
        while ( i &lt; 4){
         count += a[i];
         i++;
        }
  
     cout &lt;&lt; count;
      
  }
  </code></pre>