Write a complete C program that reads the exam answers of the student from the file answer.txt, and then compare these answers with the correct answers in key.txt. Finally display the number of correct answers for the student.
Hint : You may use a string (char [ ] ) to store the answers.
answer.txt :
9999 abdaa...
key.txt:
abbacaca...
The program output may be displayed as follows for 5 questions:
=======================================
stno : 9999 correct answers : 55
=======================================
Comments
Leave a comment