Concept:
Some compounds contain:
• Ionic bonds between ions
• Covalent bonds within polyatomic ions or complex ions
Such compounds simultaneously exhibit both ionic and covalent character.
Generally:
• Organic compounds mainly contain covalent bonds.
• Salts may contain ionic bonds.
• Complex salts may contain both ionic and coordinate/covalent bonds.
Step 1: Analyze Option (1): \( \mathrm{CH_3CH_2CHO} \)
This is propanal.
It contains:
• C--C bonds
• C--H bonds
• C=O bond
All these are covalent bonds formed through sharing of electrons.
No ionic bond is present.
Hence, Option (1) is incorrect.
Step 2: Analyze Option (2): \( \mathrm{CH_3CH_2NH_2} \)
This is ethylamine.
All atoms involved are non-metals:
\[
\mathrm{C,\ H,\ N}
\]
Therefore, bonding occurs through electron sharing.
Thus, the compound contains only covalent bonds.
Hence, Option (2) is incorrect.
Step 3: Analyze Option (3): \( \mathrm{CoCl_2} \)
Cobalt chloride is predominantly ionic in nature.
It mainly contains ionic attraction between:
\[
\mathrm{Co^{2+}} \text{ and } \mathrm{Cl^-}
\]
No separate polyatomic covalent unit exists here.
Hence, this option does not clearly contain both ionic and covalent bonds.
Therefore, Option (3) is incorrect.
Step 4: Analyze Option (4): \( \mathrm{K_2CuCl_4} \)
This compound can be represented as:
\[
2\mathrm{K^+} + [\mathrm{CuCl_4}]^{2-}
\]
Now observe carefully:
• Ionic bond exists between \( \mathrm{K^+} \) ions and \( [\mathrm{CuCl_4}]^{2-} \) ion.
• Inside the complex ion \( [\mathrm{CuCl_4}]^{2-} \), copper and chloride are connected through coordinate/covalent bonding.
Therefore, the compound contains:
• Ionic bonding
• Covalent/coordinate bonding
Hence, Option (4) is correct.
Final Conclusion:
The compound containing both ionic and covalent bonds is:
\[
\boxed{\mathrm{K_2CuCl_4}}
\]
Hence, the correct answer is:
\[
\boxed{(4)}
\]