title: Using ASCII characters in C++ program
body: <p>I've been trying to print out <code>_</code> &lt;------ this character in a 2D array... But when I     </p>
  
  <p>tried compiling the code, it returned some garbage numbers.  I think I'm doing something wrong... can anyone please help me out to solve this problem ?  </p>
  
  <pre><code>void main (){
  
      int A[9][9];
  
      for (int i=0; i&lt;9; i++){
          for (int j=0; j&lt;i; j++){
              A[i][j]= '_';//I am doing this part wrong. 
          }
  
      }
  
      for (int r=0; r&lt;9; r++) {
          for (int c=0; c&lt;9; c++)
              cout &lt;&lt; setw(3) &lt;&lt; A[r][c];
          cout &lt;&lt; endl;
      }
  
      system("pause");
  }
  </code></pre>