The species that contain unpaired electrons are paramagnetic.
Electronic configuration of Li2 molecule is (σ1s)2(σ∗1s)2(σ2s)2.
The electronic configuration of B2 molecule is
(σ1s)2(σ⋆1s)2(σ2s)2(σ⋆2s)2(π2px1=π2py1)
The presence of unpaired electrons in the two π bonding molecular orbitals explains its paramagnetic nature.
The electronic configuration of C2 KKσ2s2σ∗2s2π2px2π2py2
O2:KK(σ2s)2(σ2s)2(σ2pz)2(π2px)2=(π2py)2(π∗2px)1=(π∗2py)1
Hence, O2 molecule is paramagnetic.
The electronic configuration of C2− is (σ1s)2(σ⋆1s)2(σ2s)2(σ⋆2s)2(π2px2=π2py2)σ2pz1
Hence, it is paramagnetic substance.
O22−:KK(σ2s)2(σ2s)2(σ2pz)2(π2px)2=(π2py)2(π∗2px)2=(π∗2py)2
O2+:KK(σ2s)2(σ2s)2(σ2pz)2(π2px)2=(π2py)2(π∗2px)1=(π∗2py)
Hence, the above species is paramagnetic.