Ionic bond is a type of chemical bond that occurs when a metal atom definitively gives up one or more electrons to a nonmetal or hydrogen atom.
B-Cl both are nonmetal
H-Cl here we have hydrogen and a nonmetal
Ba-Br here we have a metal and a nonmetal (Ba is a metal and Br is a nonmetal)
C-N here we have 2 nonmetals
S-O here we have 2 nonmetals
You can know which one is a metal or a nonmetal looking into periodic table.
Answer: Ba-Br