Amniocentesis is a test to diagnose fetal abnormalities. In the method, the amniotic fluid is obtained from the amniotic sac with the help of a needle under the guidance of ultrasound. This test is basically used to detect chromosomal abnormalities and metabolic disorders in the developing fetus. It can be used for fetal sex determination also. Thus the correct answer is option B.