title: scanning matrix one row at a time
body: <p>I want to scan a 2-D matrix for <strong>integers</strong> row wise i.e. one row at a time in 'C'  </p>
  
  <p>For example:<br>
  if matrix is:  </p>
  
  <pre><code>1 2 3  
  4 5 6  
  7 8 9  
  </code></pre>
  
  <p>then there should be only 3 time scanf be used and first time input be  </p>
  
  <pre><code>1 2 3  
  </code></pre>
  
  <p>at once and so on for other row.</p>
  
  <p>for character we can use something like:  </p>
  
  <pre><code>char mat[10][10];
  scanf("%s[^\n]%*c", mat[i]);   
  </code></pre>
  
  <p>similar is possible for integers? </p>