what is an example of a substance that has both ionic &covalent bonds & where are these bonds formed.

Na2CO3 is an example. The bond between Na and carbonate ion is ionic. The bonds between C and O in carbonate ion are covalent.

NH4^+ salts such as NH4Cl, NH4Br, (NH4)2SO4 are other examples.
Also HNO3, Mg(NO3)2.