Hi there i am stuck on a programming question. The question below entails what i need to do. I have a very good idea of what i want to do to solve it, but i am stuck at the beginning. I have my data file that i have created with with the answer key and sample in it.

My problem is that i want to be able to read the strings from the file and place them in variables. If this is the right idea to start this question. Now when i place them in variables using fscanf as told to use it will not place the whole string into the variable. As seen below in this setup.
Code:
char test[20];
char studentId[8];
/*Loop to read the file completely*/
fscanf(grading,"%s %s", &studentId, &test);
/*text within the data file */
ABC54102 T FTFTFTTTFTTFTTF TF
what will happen is the ABC54102 will be stored into studentID as planned. Then the test part will only store the 'T' in the variable test and nothing else. Then when it scans the file again it will place the "FTFTFTTTFTTFTTF" into studentID. The for test it will store the remaining "TF". It will go about this until the eof. How do i stop this from happening and what should i do if you could point me in the right direction.








The instructor at your school needs help in grading a True/False test. The students’ IDs and test answers are stored in a file. The first entry in the file contains answers to the test in the form;

TFFTFFTTTTFFTFTFTFTT

Every other entry in the file is the student ID, followed by a blank, followed by the student’s responses. For example, the entry
ABC54301 TFTFTFTT TFTFTFFTTFT
Indicates that the student ID is ABC54301 and the answer to question 1 is True, the answer to question 2 is false, and so on. This student did not answer question 9. The exam has 20 questions, and the class has more then 150 students. Each correct answer is awarded 2 points, each wrong answer gets -1 points and no answer gets 0 points. Write a program that processes the test data. The output should be the student’s ID followed by the answers, followed by the test score, followed by the test grade. Assume the following grade scale: 90%-100%, A; 80%-89.99%,B; 70%-79.99%,C; 60%-69.99%,D; and 0%-59.99%, F.
A sample test data file is:

TTFTFTTTFTFTFFTTFTTF
ABC54102 T FTFTFTTTFTTFTTF TF
DEF56278 TTFTFTTTFTFTFFTTFTTF
ABC42366 TTFTFTTTFTFTFFTTF
ABC42586 TTTTFTTT TFTFFFTF