In a living organism, at which stage does segregation of gene pairs takes place?

A.
ovulation
B.
gamete formation
C.
fertilization