Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help to fix my output of this C++ code. I am getting this weird symbols on the second result of the code. Here

I need help to fix my output of this C++ code. I am getting this weird symbols on the second result of the code.

image text in transcribed

image text in transcribed

Here is the code:

#include #include #include

using namespace std;

int main() { ifstream in; in.open("studentans.txt"); ofstream out; out.open("results.txt");

char* ans = new char[100];

in.getline(ans, 100);

char** id = new char*[10000]; char** responses = new char*[10000];

for(int i = 0; i

int size = 0;

char* ch = new char[100]; while(in.getline(ch,100)) { int i = 0;

while(i

for(int j = 0;j

for(int i = 0; i

int correct = 0, wrong = 0;

for(int j = 0; j

if(avg >= 90.0) grade = 'A'; else if(avg >= 80.0) grade = 'B'; else if(avg >= 70.0) grade = 'C'; else if(avg >= 60.0) grade = 'D'; else grade = 'F';

out

in.close(); out.close();

return 0; }

studentans - Notepad File Edit Format View Help TEFTFFTTTTFFTETETETT ABC54301 TETETETT TETETEFTTET ABC54887 TE FTTTTFTETETEFTTET ABC74477 TEFTEFTTTTFFTETETEFF Help results - Notepad File Edit Format View ABC54301, 11, F ABC548870$8, F ABC74477, 34, B

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Online Market Research Cost Effective Searching Of The Internet And Online Databases

Authors: John F. Lescher

1st Edition

0201489295, 978-0201489293

More Books

Students also viewed these Databases questions

Question

6. Have you used solid reasoning in your argument?

Answered: 1 week ago