Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q4) (30 pts.) Assume that you have two files given : answer.txt and key.txt files. answer.txt file includes students number (int) and the answers of

image text in transcribed

Q4) (30 pts.) Assume that you have two files given : answer.txt and key.txt files. answer.txt file includes students number (int) and the answers of the students. key.txt file includes the answer key for 100 questions. Write a complete C program that reads the exam answers of the students from the file answers.txt, and then compare these answers with the correct answers in key.txt. Outputs the Score of each student based on their correct answers. Finally displays Pass if the number of correct answers of the student is above 50, and displays Fail if the number of correct answers of the student is below 50. Hint: You may use a string (char[] ) to store the answers. answers.txt: 1457 abdaa... 1468 bbadc... 1463 abbdc... key.txt: abbacaca... The program output may be displayed as follows for 5 questions: stno : 1457 Score: 3 Pass stno : 1468 Score: 2 Fail stno: 1463 Score: 4 Pass

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

Graph Database Modeling With Neo4j

Authors: Ajit Singh

2nd Edition

B0BDWT2XLR, 979-8351798783

More Books

Students also viewed these Databases questions

Question

=+differences in home- and host-country costs of living?

Answered: 1 week ago

Question

=+derived from the assignment will balance the costs?

Answered: 1 week ago