title: Array size bigger than elements stated
body: <p>I created an array with 9 elements but when I run the code it says the size of the array is actually 36. Why is it 36 instead of 9?</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  int main()
  {
  
      float ar[] =
      {
          0.1f, 0.2f, 0.3f,
          0.4f, 0.5f, 0.6f,
          0.7f, 0.8f, 0.9f
      };
  
      std::cout &lt;&lt; "array size = " &lt;&lt; sizeof(ar) &lt;&lt; "\n";
  
      for (int i = 0; i &lt; sizeof(ar); i++)
      {
          std::cout &lt;&lt; "array (" &lt;&lt; i &lt;&lt; ") = " &lt;&lt; ar[i] &lt;&lt; "\n";
      }
  
      return 0;
  }
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>array size = 36
  array (0) = 0.1
  array (1) = 0.2
  array (2) = 0.3
  array (3) = 0.4
  array (4) = 0.5
  array (5) = 0.6
  array (6) = 0.7
  array (7) = 0.8
  array (8) = 0.9
  array (9) = 1.26117e-044
  array (10) = 3.85682e-039
  array (11) = 1.#QNAN
  array (12) = 3.85687e-039
  array (13) = 5.88404e-039
  array (14) = 0
  array (15) = 7.20267e-043
  array (16) = 6.6267e+031
  array (17) = 5.88404e-039
  array (18) = 1.4013e-045
  array (19) = 1.5076e-038
  array (20) = 1.50692e-038
  array (21) = 2.8026e-045
  array (22) = 0
  array (23) = 3.85687e-039
  array (24) = 8.71369e+031
  array (25) = 1.#QNAN
  array (26) = 3.85694e-039
  array (27) = 5.88418e-039
  array (28) = 1.4013e-045
  array (29) = 0
  array (30) = 0
  array (31) = 0
  array (32) = 0
  array (33) = 0
  array (34) = 0
  array (35) = 6.91554e+031
  </code></pre>
  
  <p>My post doesn't need more details stop asking for more text
  My post doesn't need more details stop asking for more text
  My post doesn't need more details stop asking for more text
  My post doesn't need more details stop asking for more text</p>