(a) Formula of carnallite is $KCl\ .\ MgCl_{2}\ .\ 6H_{2}O$ so, carnallite contains K and Mg.
Physics Educator & NEET/JEE Specialist
Ph.D. in Physics with 19+ years of teaching experience.