title: How do I skip a part of standard input with scanf?
body: <p>I'm writing a c program, and my standard input looks something like this.</p>
  
  <pre><code>2
  1 3 4
  6 9 1
  3 6 0
  3 5 1
  2 6 1
  </code></pre>
  
  <p>My c program stores the first number in a variable called <code>rowToConsider</code>. I then read the <code>rowToConsider</code>th row (0-indexed) of numbers into array <code>nums</code>.</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  
  int main() {
    int rowToConsider;
    int nums[3];
  
    scanf("%d", &amp;rowToConsider);
  
    for (int i = 0; i &lt; rowToConsider; i++) {
      // My attempt to read a row into nothing. Basically, just skip the row.
      scanf("%d %d %d");
    }
  
    scanf("%d %d %d", nums, nums + 1, nums + 2);  
  }
  </code></pre>
  
  <p>However, the <code>scanf</code> within the for loop is triggering a segmentation fault.</p>
  
  <p>How do I skip some rows before reading in an array of 3 ints?</p>