We have
One out of every six student fails, which means that th of the total students fail in the class.
And total number of students in the class = 42.
Therefore, the number of students who fail = = 7.
So, the number of students who pass = (Total students the number of students who fail) = 42 7 = 35.