title: Fscanf, Strings, and Arrays in C?
body: <p>I have a programming assignment. The code is laid out for us, we just have to fill it in. Its been a while since i've touched arrays so i need some help. </p>
  
  <p>The program is declaring a char array. It is using fscanf to get strings from a file. The file contains 3 lines of text with two strings separated by a space in each line. So it would look like "12345 abcd". </p>
  
  <p>They have this going in a loop. Questions: </p>
  
  <p>1) is each string stored in separate values of the array ex: array[0] = "12345" and array[1] = "abcd". Its not in this format, right? : array[16] = {1,2,3,4,5, ,a,b,c,d}. The fscan is in a loop. format: (fscanf(in, %s, array)</p>
  
  <p>2) When fscanf is called, does it process 12345 as a separate string (since there is a space after the five) or does it process "12345 abcd" as one string in a file and return it. </p>
  
  <p>3) Lets say i've used fscanf to scan in 12345 and store it in (array[0]). Then i use fscanf in another instance. Will it store the next string "abcd" in array[1]</p>
  
  <p>Thanks</p>