<u>Answer:</u> The correct answer is Option B.
<u>Explanation:</u>
Compound having oppositely charged ions are considered as ionic compounds.
Ionic compounds are formed when complete transfer of electrons takes place between the atoms forming a bond. This bond is formed between a metal and a non-metal or a polyatomic cation and an non-metal or a metal and a polyatomic anion. <u>For Example:</u>
etc..
Covalent compounds are formed when sharing of electrons takes place between the atoms forming a bond. This bond is formed between two non-metals. <u>For Example:</u>
etc..
For the given options:
<u>Option A:</u> 
Oxygen and chlorine both are non-metals. Thus, it is forming a covalent compound.
<u>Option B:</u> 
Sodium is a metal and oxygen is a non-metal. Thus, it is forming an ionic compound and contain oppositely charged ions.
<u>Option C:</u> 
Nitrogen and hydrogen both are non-metals. Thus, it is forming a covalent compound.
<u>Option D:</u> 
Sulfur and chlorine both are non-metals. Thus, it is forming a covalent compound.
Hence, the correct answer is Option B.