For my class I am making a "test" for a CSC student. I've decided in the function that displays the test to the user, to store all answers to the test in a array. Once the test is completed (in a separate function) the user will have the option to grade the test if the correct pin is entered. After correct pin is entered that function will call the "grade" function. My question is, once the test is completed in the first function how do I call the second function with a copy of the array so I can call the grade function with the same copy so the test can be graded? This is what I have tried so far.
int main(){
int answers[15]; /* idea was answers would be a copy of givenAnswer
in input function. then would be called in AnswerKeyPrompt*/
input(givenAnswers);
answerKeyPrompt(answers);}
void input(int* givenAnswers){
// this is where the test display test and all user input is stored in array
givenAnswers
void answerKeyPrompt(int){
// this function will ask user for pin. if correct pin is entered it will call grade function with copy of givenAnswers}
void grade(int){
// this function takes givenAnswers and compares it to answerKey array and calculates grade}
when I do this I get a invalid conversion from int to int*. Thanks for any help.