title: Testing all cases regarding the return value of scanf
body: <p>With the code below, if I enter 1 string and ctrl-D, it will print did not scan in two words and exit. However if I enter 3 or more strings it takes the first two and throws away the rest. How can I account for this - to make an exit happen if more than two strings are entered? </p>
  
  <pre><code>int scan_count = 0;
  
  printf("Enter two strings: \n");
  
  scan_count = (scanf("%s %s", first_word, second_word));
  if (scan_count != 2)
  {
      printf("Did not scan in two words successfully, exiting.\n");
      exit(2);
  }
  </code></pre>