title: Printing a row of 2d char array (C++)
body: <p>So I've declared a 2d array and want to display its rows one by one.But when I execute the following code I see all the rows in the matrix starting from the one I require.</p>
  
  <p>Code:</p>
  
  <pre><code>#include&lt;iostream.h&gt;
  #include&lt;conio.h&gt;
  #include&lt;stdio.h&gt;
  
  char topics[3][10]={"Literature","Science---","Sports----"};
  
  void main()
  {
      clrscr();
      cout&lt;&lt;topics[0][0]&lt;&lt;endl&lt;&lt;topics[1][0]&lt;&lt;endl&lt;&lt;topics[2][0]&lt;&lt;endl;
      puts(topics[0]);
      cout&lt;&lt;endl;
      puts(topics[1]);
      getch();
  }
  </code></pre>
  
  <p>Output:   </p>
  
  <pre><code>L    
  S   
  S   
  LiteratureScience---Sports----         
  Science---Sports----
  </code></pre>
  
  <p>What I want my program to do is that when puts(0) is executed, only 'Literature' should be displayed and when puts(1) is executed, only 'Science---' is displayed.</p>
  
  <p>I am a beginner. Please suggest what corrections should I make.Thank you. :)</p>