if i store file1 into an array of size 10(right answers) and file2(answers of students) into an array of 20, how can i compare the rest of file2 after the first 10 have been compared?
would separating the original file2 into different arrays be possible?
Right off the top my head I'm thinking of expanding the size of file1(dynamic allocation), storing that array with new answers, and comparing the rest of file2 with the new answers in file1. I'm not sure if that's the best approach, but it's all I got at the moment.
you can compare them however you wish, using a for loop or some sort of iterator isn't limited to one time use...so it just depends on how you want to compare the remaining 10 items...
but I am wondering how students give 20 answers to a problem that only has 10 correct answers XD
I think you should check students against the right ones. So you should compare each student answer against all right answers. You may stop checking a students answer if you've detected that his/her answer is the right one. Am I right?