KCN is predominantly ionic and provides cyanide ions in solution. Although both carbon and nitrogen atoms are in a position to donate electron pairs, the attack takes place mainly through carbon atom and not through nitrogen atom since C—C bond is more stable than C—N bond.