Task:

Write a program to grade a test and print the student’s score. The questions are in multiple choices form. There are 25 questions given in the test and each question has 4 choices; A,B,C and D. Assumed that there are 20 students taking the test. Each answer is stored in an array named answer as given below:

char  answer [ ] = {“BACDACBDABBACADAABACABCDA”};

The student’s name, matrix number and the student’s answer is provided in a data file in the following format:

/* Matrix No        Student’s answer */
    11111       ABCDABCDABCDABCDABCDABCDA   
    11122       BBCCDDAABBCCDDAABBCCDDAAB
     11133      AAAAABBBBBCCCCCDDDDDABCDA

For every correct answer, 4 marks will be given as a score and for every wrong answer, 1 mark will be deducted from the score.

Grade will be given base on the following scheme:

Marks/Grade
75 – 100    A
65 – 74 B
55 – 64 C
45 – 54 D
0 – 44  E

The output for the program is the name of the student, the matrix number, the score and the grade for each student.

Recommended Answers

All 4 Replies

>Write a program to grade a test and print the student’s score.
Too boring for me, more interesting for me is to see what you've made of it, tell us when you're finished.

>Task:

>Write a program to grade a test and print the student’s score.
The task was given to you. You will be given grades for that.
You are redirecting the task to us, we won't get anything out of it. But that was perfectly fine if you could get any help out of it. If we will cook your food, how will you manage to live ones we are gone?

>Write a program to grade a test and print the student’s score.
Too boring for me, more interesting for me is to see what you've made of it, tell us when you're finished.

come on. i want find the answer

commented: nope. -4

come on. i want find the answer

The answer is within you my child. Just unleash it!

commented: Ah yes grasshopper, to know the path is to know the way +36
commented: Indeed! +21
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.