Ive got an assignment to do over the weekend in c. Firstly the assisgment is to create a game which asks the user a question from there they can pick yes of no. When the user picks a person and answers the questions the program will determin who that person is but when the program cant find a match the program will ask the user for that person and an associating question to distingus them. The data is meant to be in a binary tree from a file so that when the program is run it will remember the persons added to the file.


So for the last few hours ive decided that my file will be laid out as so:
Code:
1 Are you Female?
2 //space for another question going down the yes side
3 //space for another question going down the no side
etc

The only program that i can invisage now is how can one search through the file to find the corresponding number to the next question it should ask? and then print that line to the user to get a reply from. Ive gone though the faq on files but could not make sense of the fseek function that i need to use


Any help would be greatly needed