I was wondering if anyone could help me on a project that I'm working on. It's an exam grader. Basically, I have to write a program that grades a certain number of student's exams by comparing a string of letters to another string in a .txt file.
The file is set up like so:
bccbbadbca
bccaadbada
bccbbabbca
[...]
Where the first line in the file is the key to the exam and the rest are the students' answers.
My question, then, is how do I get my program to read in the first line as the key, then compare it to the rest of the lines?
Would I set the first line into an array, then use a loop to compare?