title: Printing the addresses of variables in decimal
body: <p>I'm trying to print the addresses of the elments of an array in decimal instead of hexa but it doesn't work. Below is the code and output example.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;iomanip&gt;
  using namespace std;
  
  void printarrandptr(int arr[], int size);
  const int LEN = 5;
  
  void main(){
  
      int arr[LEN] = { 15, 3, 14, 11, 14 };
  
      int *p[LEN];
  
      printarrandptr((int*)arr, LEN);
  }
  
  void printarrandptr(int arr[], int size){
      int i;
  
      for (i = 0; i &lt; size; i++)
          cout &lt;&lt; setw(9) &lt;&lt; &amp;arr[i] &lt;&lt; setw(4) &lt;&lt; arr[i] &lt;&lt; endl;
      cout &lt;&lt; endl;
  }
  </code></pre>
  
  <p>output example:</p>
  
  <pre><code> 0098FDC8  15
   0098FDCC   3
   0098FDD0  14
   0098FDD4  11
   0098FDD8  14
  </code></pre>