Developing embryos obtain some energy from parent in addition to or instead of from yolk. These are termed viviparous. The young are produced at various stages, the ultimate being tsetse flies which are retained in female until ready to pupate. Aphids and some earwigs are also viviparous. In some species, the immature insects have mature reproductive tracts, and can reproduce while still larvae.
Aphids are one type of example.
Very fast generation time this way 4-5 days. In some midges, the larvae are released into the haemocoel of the parent mother larva, and the young eat their way out. In some species, eggs can develop without being fertilized. Sex of offspring depends on behavior of chromosomes at meiotic division and also the sex determining mechanism of the insect species. In most insect, the male is the heterotrophic sex, being either XY or X0.