Engg 1 mid terms and finals

Hi, what happens if you fail a core subject in 2nd sem? Are you allowed to retake during summers? Also what happens if you fail a mid term which has weightage of 20%, will it be considered as zero since one failed in mid terms?