title: Two dimensional array want to print a row and only a second column
body: <pre><code>#include&lt;iostream&gt;
  #include&lt;conio.h&gt;
  using namespace std;
  const int maxRows =3;
  const int maxCols =3;
  //prototype declaration
   void readMatrix(int[][maxCols]);
  void displayMatrix(int[][maxCols]);
  //void displayFlippedMatrix(int [][maxCols]);
  //
   main(){
      int a[maxRows][maxCols];
      //read the matrix elements in array
      readMatrix(a);
       //display the original matrix
       cout&lt;&lt;"\n\n"&lt;&lt;"the original matrix is: "&lt;&lt;'\n';
      displayMatrix(a);
      //display the flipped matrix
      cout&lt;&lt;"\n\n"&lt;&lt;"the flipped matrix is :"&lt;&lt;'\n';
  //      displayFlippedMatrix(a);
  
  
  
  
      getch();
      system("pause");
  }
  
  void readMatrix(int a[][maxCols]){
      int row,col;
      for(row=0; row&lt;maxRows; row++){
  
          for(col=0; col&lt;maxCols; col++){
  
              cout&lt;&lt;"\n"&lt;&lt;"Enter"&lt;&lt;row&lt;&lt;","&lt;&lt;col&lt;&lt;"Element:";
              cin&gt;&gt;a[row][col];
          }
          cout&lt;&lt;'\n';
      } 
   }
  // end of read Matrix........
  void displayMatrix(int a[][maxCols]){
      int row,col;
      for(row=0; row&lt;maxRows; row++){
  
          for(col=0; col&lt;maxCols; col++){
              **cout&lt;&lt;a[0][1]&lt;&lt;'\t';**
          }
          cout&lt;&lt;'\n';
      }
   }
  
  // end of displayMatrix......
  
  /*
   void displayFlippedMatrix(int a[][maxCols]){
      int row,col;
       for(row=maxRows-1; row&gt;0; row--){
  
           for(col=0; col&lt;maxCols; col++){
               cout&lt;&lt;a[row][col]&lt;&lt;'\t';
           }
           cout&lt;&lt;'\n';
       }
   }*/
  </code></pre>
  
  <p>here i have complete code of flipping matrix from last row in to first row and first row in to last row and <strong>this code is working perfectly</strong> but i have one question and i want to understand it if any one  i just want to print a matrix  i.e <strong>cout&lt;&lt;&lt;'\t';<em>in a single row and only second column</em></strong> as i know that [0][1] zero for known as first row and [1] is known as second column but it is actually printing all rows and all columns even though i have only cout[0][1] first row and second column.</p>