We have,
Number of students in a class = 40, and
Number of boys in a class = 14,
Mean of marks obtained by boys = 33, and
Mean of marks obtained by girls = 35
Number of girls in the class =
Sum of marks obtained by boys = , and
Sum of marks obtained by girls =
So, the mean of all students in the class = .