The compound which contains −COCH3 group in its structure, give positive iodoform test and the compound which contains −CHO group give positive Fehling test.
In ethanal, CH3CHO both the groups are present, hence it responds to both iodoform test and Fehling's test.
Iodoform test CH3CHO+I2+NaOH→CHI3+NaI+H2O