title: How is initializing an array different from mallocing memory?
body: <p>I am new to C++. I am having trouble differentiating between initializing an array and mallocing memory. To me, they seem to accomplish the same purpose.</p>
  
  <p>Specifically, I can initialize an array via <code>int myArray[] = {1, 2, 3};</code>. I can also use <code>malloc</code> to obtain memory and assign it to a void pointer. Later, I free this memory.</p>
  
  <p>What is the difference between these two methods? Does a computer store the data in the same places and in the same ways?</p>