Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 2 You have been hired under a student working scheme program. Your first task is to write a C program to assist in one

image text in transcribed

QUESTION 2 You have been hired under a student working scheme program. Your first task is to write a C program to assist in one of the professors in the faculty to grade the final exam of his/her students. The exam consists of 20 multiple-choice questions. Each question has one of four possible answers: A, B, C, or D. The program will read in the students' answers and the correct answers from files and prints out the result onto the screen and also the file output. There are at least 15 students in class. Input The students' answers are stored in a data file named "StudentAnswers.dat" as shown in Figure 2.1. In this file, the first column represents the students' name (1 word), second column represent the students' ID and the third column until the last column represent the students answer of question 1 until question 20. In this example (Figure 1.1), there are only five students. You have to complete this input file with data at least for 15 students and cover all situations. The correct answers for all the questions are stored in a text file named Correct Answers.txt" as shown in Figure 2.2. Output The program needs to determine and print out the following items on the screen as shown in Figure 2.3: o Ask the user to enter student's ID o Display the student's ID and student's name o Compare the student's answers and the correct answers. Calculate and display the total number of question missed by the student. Display the list of the questions missed by the students, showing the correct answers and the incorrect answers by the student for each missed question. o Calculate and display the percentage of questions answered correctly. This can be calculated as: correctly answered questions percentage = x 100 total number of questions o Display the grade of the students based on the percentage as follows: 80 percentage

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2012 Administration

Authors: Adam Jorgensen, Steven Wort

1st Edition

1118106881, 9781118106884

More Books

Students also viewed these Databases questions