answersLogoWhite

0

There are many ways. The simplest way would be to use a structure (Q) with two members: a pointer to the question and a pointer to the answer. If the quiz is text-based, then both pointers will point to null-terminated strings. If the quiz is multiple choice, then the answer may point to another structure (A) containing a dynamic array of pointers to null-terminated strings, along with a zero-based index to the correct answer. Either way, you can build a series of questions using a one-dimensional array of Q structures.

To store the data in a file, you simply store the count of questions (the number of elements in the Q array) and then sequentially write all of the questions followed by all of the answers. If the answers are a multiple choice structure (A), then store the number of elements in the answer array, the zero-based index of the correct answer, and then the answer array itself. When you read the file back, you can rebuild the original array.

Of course anyone can read the text file outwith your program and cheat the quiz. To avoid this, obfuscate the answers by XOR-ing each character (other than the NULL terminator) with a pre-determined, nonzero character code. When you read the file back, XOR the characters with that same character code to restore the original characters. This is a simplistic cipher but it will be enough to deter most would-be cheaters.

can you please give me your email or contact me please as soon as possible

nabeelbhutto@gmail.com

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Why can't i write this quiz?

WikiAnswers is not a quiz site. We are a question and answer website.


How do you write a folded quiz book?

YOu can't


Which song did tusk write?

cheating for the german quiz ?


What is the theme tune to Joff's Progressive Quiz on Royal Caribbean ships?

The theme tune to The Rockford Files


How do you write a 24 out 30 in a quiz as a percent?

24/30 = 80%We sincerely hope ... and are relatively certain ... that it wasn't a math quiz.


Is your ex using you quiz?

No, She is banging your family instead


What is a quiz?

A quiz is a questionnaire normally based on intelligence (How clever you are). The quiz asks questions and will sometimes give you options to select, and sometimes you have to write your own answer. You can find quizzes in magazines, newspapers, books, and on the internet. One of the best quiz sites is: quizfarm.com quizzesgalore.co.uk


How do you make a quiz on fun140?

First, of all you need a account for fun140, the u go to create a quiz on your fun140 page and u write your parts then the story for the part


Can you make a quiz online?

There are many websites that offer a service of making a quiz online. Most of them offer some kind of free service.Traditional quiz sites offers:You can make a quiz onlineShare it with your friendProtect it with passwordAnalyze quiz resultsA wiki quiz sites offers:All (or most of) the traditional quiz sites featuresSharing quiz questions (not just the quiz)Create a quiz by using existing quiz questions (no need to invent the wheel)Creating only a quiz question and sharing it on the site for others to use in their quiz.


What is the best way to quiz yourself using your column notes?

answer it your self


What is an example of a sentence using the word Generate?

He will generate all the questions necessary for the quiz.


What is the best way to quiz yourself later while using column notes?

Ifk