Can someone please do this or show me how at least. This iswaaaay more advanced
ID: 3618189 • Letter: C
Question
Can someone please do this or show me how at least. This iswaaaay more advanced than meI have to write a program for #12 on page 446 USING FUNCTIONS. Functionsconfuse me. I have te rest of the program down but the functionpart and when and how to call it kills my brain.
Has anyone done this problem yet??? I have to turn this in tomorrow...I'm screwed.
12. One of your professors has asked you to write aprogram to grade her final exams. which consist of only 20multiple-choice questions. Each question has one of fourpossible answers: A, B, C, or D. The file CorrectAnswers.txt,which is on the Student CD, contains the correct answers for all ofthe questions, each answer is written on a separate line. Thefirst line contains the answer to the first question, the secondline contains the answer to the second question, and soforth.
Write a program that reads the contents of theCorrectAnswers.txt file into a one-dimensional char array, and thenreads the contents of another file, containing a student's answers,into a second charr array. The Student CD has a file namedStudentAnswer.txt that you can use for testing purposes. Theprogram should determine the number of questions that the studentmissed, and then display the following: * A list of the questions missed by the student, showingthe correct answer and the incorrect answer provided by the student for each missedquestion. * The total number of questions missed * The percentage of questions answered correctly. This can be calculated as:
Correctly Answered Questions(divided by) Total Number of Questions
* If the percentage of correctly answered questions is70% or greater, the program should indicate that thestudent passed the exam. Otherwise, it should indicate thatthe student failed the exam.
* Here is the CorrectAnswers.txt file contents A D B C A A D B D C A D B A C C D B C A
* Here is the StudentAnswers File contents A D B D A A D B D C A A B A C C C B C A
Can someone please do this or show me how at least. This iswaaaay more advanced than me
Has anyone done this problem yet??? I have to turn this in tomorrow...I'm screwed.
12. One of your professors has asked you to write aprogram to grade her final exams. which consist of only 20multiple-choice questions. Each question has one of fourpossible answers: A, B, C, or D. The file CorrectAnswers.txt,which is on the Student CD, contains the correct answers for all ofthe questions, each answer is written on a separate line. Thefirst line contains the answer to the first question, the secondline contains the answer to the second question, and soforth.
Write a program that reads the contents of theCorrectAnswers.txt file into a one-dimensional char array, and thenreads the contents of another file, containing a student's answers,into a second charr array. The Student CD has a file namedStudentAnswer.txt that you can use for testing purposes. Theprogram should determine the number of questions that the studentmissed, and then display the following: * A list of the questions missed by the student, showingthe correct answer and the incorrect answer provided by the student for each missedquestion. * The total number of questions missed * The percentage of questions answered correctly. This can be calculated as:
Correctly Answered Questions(divided by) Total Number of Questions
* If the percentage of correctly answered questions is70% or greater, the program should indicate that thestudent passed the exam. Otherwise, it should indicate thatthe student failed the exam.
* Here is the CorrectAnswers.txt file contents A D B C A A D B D C A D B A C C D B C A A D B C A A D B D C A D B A C C D B C A
* Here is the StudentAnswers File contents A D B D A A D B D C A A B A C C C B C A
A D B D A A D B D C A A B A C C C B C A