Number of female students in Electrical = $40\times \dfrac{4}{5} = 32$
Number of female students in Civil = $32\times \dfrac{30}{20} = 48$ (Since proportion of male students to female students is same, the breakup chart is the same for number of female students)
Number of female students in Mechanical = $32\times \dfrac{10}{20} = 16$
So, answer = $48 - 16 = 32$