Answer
Compounds consisting of molecules: P$_{4}$O$_{10}$
Compounds consisting of ions: SrCl$_{2}$, MgCO$_{3}$, and H$_{2}$SO$_{4}$
Work Step by Step
Compounds that consist of molecules are those that contain two or more nonmetals bonded together. In these compounds, electrons are shared among the atoms. In compounds consisting of ions, electrons are transferred from one atom to another, forming ions. It is the attraction of positive and negative charges that create the bond between the ions. Ionic bonds usually happen between a metal and a nonmetal. The metal loses electrons and become positive, forming a cation; the nonmetal gains electrons and becomes positive, becoming an anion.
In this problem, P$_{4}$O$_{10}$ is the only molecular compound because it is a compound made up of two nonmetals: phosphorus and oxygen.
The other options, SrCl$_{2}$, MgCO$_{3}$, and H$_{2}$SO$_{4}$, are all ionic compounds consisting of a metal (or, in the case of hydrogen, an element from group 1 of the periodic table) bonded to one or more nonmetals.