title: What is the time complexity of array initialization?
body: <p>Consider following two cases of Array initialization in C or C++ :</p>
  
  <p>Case 1:</p>
  
  <pre><code>int array[10000] = {0}; // All values = 0
  </code></pre>
  
  <p>Case 2:</p>
  
  <pre><code>int array[10000];
  for (int i = 0; i &lt; 10000; i++) {
      array[i] = 0;
  }
  </code></pre>
  
  <p>Do they both take same time ? what is the complexity of Case 1? and, Which one is better?</p>