title: Garbage value getting displayed on printing 2d array using row order
body: <p>I am using gcc compiler on ubuntu 16 , when I am printing value garbage value is getting displayed</p>
  
  <pre><code>#include &lt;bits/stdc++.h&gt;
  int Arrayprint(int r, int l, unsigned int* q)
  {
      r = 3;
      l = 4;
  
      for (int i = 0; i &lt; r; i++) {
          for (int j = 0; j &lt; l; j++) {
              cout &lt;&lt; *(q + sizeof(unsigned int) * (i * l + j)); //Garbage getting diplay
              cout &lt;&lt; *(q + i + j); //this working
              cout &lt;&lt; "\t";
          }
      }
      cout &lt;&lt; "size of unsigned int : " &lt;&lt; sizeof(unsigned int); //4
      cout &lt;&lt; "size of int : " &lt;&lt; sizeof(int); //4
  }
  
  int main()
  {
      unsigned int image[R][L] = { { 1, 2, 3, 4 },
          { 5, 6, 7, 8 },
          { 9, 10, 11, 12 } };
  
      unsigned int* q = (unsigned int*)image;
      Arrayprint(R, L, q);
  }
  </code></pre>