A. 47.5
B. 87
C. 52.5
D. 50
Sum of the marks for the class of 30 students = 30 * 40 = 1200
Sum of the marks for the class of 50 students = 50 * 60 = 3000
Sum of the marks for the class of 80 students =
1200 + 3000 = 4200
Average marks of all the students = 4200/80 = 52.5