title: C++ scanf/printf of array
body: <p>I've written following code:</p>
  <pre><code>int main() {
      double A[2];
      printf(&quot;Enter coordinates of the point (x,y):\n&quot;);
      scanf(&quot;%d,%d&quot;, &amp;A[0], &amp;A[1]);
  
      printf(&quot;Coordinates of the point: %d, %d&quot;, A[0], A[1]);
      return 0;
  }
  </code></pre>
  <p>It's acting like this:</p>
  <blockquote>
  <p>Enter coordinates of the point (x,y):</p>
  <p>3,5</p>
  <p>Coordinates of the point: 3, 2673912</p>
  </blockquote>
  <p>How is it possible, that 5 converts into 2673912??</p>