Hello everyone my task is to write a program that reads quizzes from a file 'q.txt', randomly selects a number of questions, and
presents them to the user one-by-one, collecting user answers. After user has answered all questions,
program gives user the score.
please can someone give me the hint on how to go about it and how to handle the structure.


8 Years
Discussion Span
Last Post by abhimanipal

I recommend that you use some paper or a text editor to lay out some idea of how the program should flow, ignoring coding details. After you are happy that you see how the program will flow, then start filling in code, starting with whatever part makes most sense to you, then do another, etc.
Be sure to add some printf statements that will help you keep track of how well it is doing... I usually make sure that the text of my printf starts with 'DEBUG' so I can easily find them in the editor and comment them out or remove them.

I also recommend that you read the 'read me first' threads: We won't really help you with your homework until you have showed at least a start on your own.


I have started with the task but i got hook up it got to the place i have to ask the user to take the right anser to the question asked and another thing is i was also ask to use function and what i have in mind is to do it with function using pointer only.

Any hints on that?


I saw this same question on this forum a couple of days ago ...
Go thru the postings on this forum for last 2-3 days ....

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.