The capacity of SX2 (X = F, Cl, and Br) to engage in different kinds of noncovalent bonds was investigated by ab initio calculations. SCl2 (SBr2) has two sigma-holes upon extension of Cl (Br)-S bonds, and two sigma-holes upon extension of S-Cl (Br) bonds. SF2 contains only two sigma-holes upon extension of the F-S bond. Consequently, SCl2 and SBr2 form chalcogen and halogen bonds with the electron donor H2CO while SF2 forms only a chalcogen bond, i.e., no F center dot center dot center dot O halogen bond was found in the SF2: H2CO complex. The S center dot center dot center dot O chalcogen bond between SF2 and H2CO is the strongest, while the strongest halogen bond is Br center dot center dot center dot O between SBr2 and H2CO. The nature of these two types of noncovalent interaction was probed by a variety of methods, including molecular electrostatic potentials, QTAIM, energy decomposition, and electron density shift maps. Termolecular complexes X-2 center dot center dot center dot H2CO center dot center dot center dot SX'(2) (X = F, Cl, Br, and X' = Cl, Br) were constructed to study the interplay between chalcogen bonds and halogen bonds. All these complexes contained S center dot center dot center dot O and Cl (Br)center dot center dot center dot O bonds, with longer intermolecular distances, smaller values of electron density, and more positive three-body interaction energies, indicating negative cooperativity between the chalcogen bond and the halogen bond. In addition, for all complexes studied, interactions involving chalcogen bonds were more favorable than those involving halogen bonds.