The best way to figure out ionic compounds is to simply look at where each element is on the periodic table. Ionic compounds tend to be on opposite sides of the periodic table.
This is because a compound is ionic if one element gives up electrons and one receives electrons. Because of the octet rule, each element wants to have a full set of valence electrons and be like the noble gases, the last row of the periodic table. Thus, elements that are close to being like a noble gas are very reactive since they want to be like a noble gas so badly. The elements on the left side of the periodic table want to lose electrons while those on the right want to gain electrons. When they meet, they react and form ionic compounds.
So which of these four compounds have elements on opposite ends of the periodic table? (By the way, there are two ionic compounds in the choices you gave)