To find the total number of students surveyed, you simply need to add the numbers of students who expressed interest in each elective:
Spanish: 14
Theater: 20
Art: 6
Total = 14 + 20 + 6 = 40
So, the total number of students surveyed is 40. The correct answer is D-40.