The number of ways when no student failed in any examination =(23−1)4 The number of ways when out of above cases atleast one subject was not cleared by any students =3C1(3)4 The number of ways when out of above cases atleast any two subjects were not cleared by any student =3C2(1)4. So required cases =(23−1)4−3C134+3C2=2161