In a test, a candidate attempted only 8 questions and secured 50% marks in each of the questions. If he obtained a total of 40% in the test and all question in the test carried equal marks, how many questions were there in the test?