write a function int Grade(char answer[10],char key[10]); to gradea multiple cho
ID: 3612262 • Letter: W
Question
write a function int Grade(char answer[10],char key[10]); to gradea multiple choice exam. The exam has 10 questions, each answeredwith the letter in the range 'a' to 'f'. All the answers for astudent are stored in the character array answer. The key answer isalso stored in the array key. Both the answers and the key arepassed to the function Grade as parameters. The function Gradereturns the number of correct answers given by the student. Forexample, if the key is "abadefbdfe" and the answer is "abcdefabcd",the function returns 5 (since there are only five correctanswers).Explanation / Answer
please rate - thanks #include using namespace std; int Grade(char [],char []); int main() {char answer[]={"abcdefabcd"}; char key[]={"abadefbdfe"}; int total; total=Grade(answer,key); coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.