title: c++ doesn't set some of the array elements to nullptr
body: <p>Inside of <code>int main()</code> i declared <code>double* arr = new double[2];</code> (an array that its items should be set to double or to nothing)</p>
  <p>then i tried to change the values of the array elements from another function <code>void func(double* arr_pointer[2])</code> by setting them to</p>
  <pre><code>arr_pointer[1] = nullptr;
  arr_pointer[0] = nullptr;
  </code></pre>
  <p>but after i checked whenever their values changed to <code>nullptr</code> (in the main function) by printing out</p>
  <p><code>cout &lt;&lt; (nullptr == &amp;arr[0]) &lt;&lt; ' ' &lt;&lt; (nullptr == &amp;arr[1])</code></p>
  <p>i got <code>1 0</code> in the console,
  why?</p>
  <p>minimal reproducible example:</p>
  <pre><code>#include &lt;iostream&gt;
  
  void func(double* arr_pointer[2], double&amp; abc) {
      if (abc &gt; 0) {
          (*arr_pointer)[0] = 20;
          (*arr_pointer)[1] = 22;
      }
      else if (abc == 0) {
          (*arr_pointer)[0] = 10;
          arr_pointer[1] = nullptr;
      }
      else {
          arr_pointer[1] = nullptr;
          arr_pointer[0] = nullptr;
      }
  }
  
  int main() {
      double* arr = new double[2];
      double abc = -1.2;
      func(&amp;arr, abc)
      std::cout &lt;&lt; (nullptr == &amp;arr[0]) &lt;&lt; ' ' &lt;&lt; (nullptr == &amp;arr[1])
  }
  </code></pre>