Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Ok so I am trying to find out what I am doing wrong. atm I am usingtwo arrays. O

ID: 3615371 • Letter: O

Question

Ok so I am trying to find out what I am doing wrong. atm I am usingtwo arrays. One for the test answers and the second for the studentanswers. Not sure if Im correct but Im trying to get startedearlier.


#include<iostream>
using namespace std;
int main()

{char answers[]="TFFTFFTTTTFFTFTFTFTT";
char studanswer[21];
int question,score;
score=0;
for (question[]=0,question>19,question++);
If (answers[question]==studanswer[question])
score=score+2;
else
if (studanswer[question]!=answers[question])
score=score--;

system ("pause");
return 0;}

Explanation / Answer

please rate - thanks good idea, good start next time post a copy of the question, no one can see what you'redoing wrong if they don't know what the question is watch your syntax #include using namespace std; int main() {char answers[]="TFFTFFTTTTFFTFTFTFTT";   this is 21 character--it has a null char studanswer[20];                                         // don't need room for null, since treating ascharacter array not string int question,score; score=0; cin.getline(studanswer,20);                                           //input student answerhere                                                  for (question[]=0;question
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote