In a class test 5 marks are given for every correct answer and ( - 2 ) marks are given for every incorrect answer and no marks for not attempting any question. C scores ( - 5 ) marks by attempting 13 questions. How many questions has C attempted correctly and how many has C attempted incorrectly?

number correct --- x , where 0 ≤ x ≤ 13

number incorrect --- y
number not answered 13-x-y

5x - 2y + 0(13-x-y) = -5

5x - 2y = -5
we need integer solutions for this equation
y = (5x + 5)/2
the numerator must be even, so x must be odd
if x=1, y=5
if x = 3, y = 10
if x = 5, y = 15 , not possible from here on

So two cases:
1 correct, 5 wrong, 7 not attempted
check: 1(5) + 5(-2) = -5

3 correct, 10 wrong, all attempted
check: 3(5) + 10(-2) = -5

To solve this problem, we need to set up equations based on the given information.

Let's assume C has attempted x questions correctly and y questions incorrectly.

According to the problem, for every correct answer, 5 marks are given and for every incorrect answer, -2 marks are given. C scores -5 marks in total by attempting 13 questions.

So, we can set up the following equation:

5x - 2y = -5 ----(1)

Next, we know that C attempted a total of 13 questions. So, the sum of correct and incorrect attempts should be equal to 13.

x + y = 13 ----(2)

Now, we have two equations (1) and (2) to solve simultaneously.

We can solve this system of equations using various methods such as substitution, elimination, or matrices.

Let's solve it using the substitution method:

From equation (2), we can express y in terms of x as follows:

y = 13 - x

Substituting this value of y in equation (1), we get:

5x - 2(13 - x) = -5

Simplifying this equation, we have:

5x - 26 + 2x = -5

Combining like terms, we get:

7x - 26 = -5

Adding 26 to both sides:

7x = 21

Dividing both sides by 7:

x = 3

Now, substitute the value of x back into equation (2) to find y:

3 + y = 13

y = 10

Therefore, C has attempted 3 questions correctly and 10 questions incorrectly.