Question: In C language This project aims to generate several randomly ordered booklet and their answer sheet from a single input exam sample file.
In C language
This project aims to generate several randomly ordered booklet and their answer sheet from a single input exam sample file. The program receives an input text file with a restricted formatCheck the sample input file, sample.txt containing tens of multiplechoice questionsassume N questions and the correct answer to each question. then the user determines how many booklets assume m with how many questionsassume nN should be generated. As the output files, the program generates files for each booklet, one for the questions and one for the answer sheeta total of m files in the booklets, the order of the questions should be random, and the options should be randomly changed. So you should select randomly n questions out of N and change the order of their options. Of course, a question should not be in a booklet more than one time.
Hints: Create a Question structure containing the following features:
Question number int
Question body string
option A string
option B string
option C string
option D string
Answer char
Then create another structure for storing all questions in it name it QuestionBank.
Read the questions from the file convert them into the Question structure and store them in the QestionBank
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
