Nitriles, amides and carboxylic acids

Nitriles are organic compounds that have the general formula RCN (RC≡N). 

Nitriles can be prepared by a substitution reaction using KCN. 
The :C≡N: ion is a good carbon nucleophile, and this substitution results in extension of the carbon chain.

Reaction 1:  CH3CH2Br + :C≡N:  CH3CH2C≡N: + Br
 
The nitrile functional group is on the same oxidation level as carboxylic acids and amides which also have three bonds from carbon to more electronegative atoms.
This means that both a nitrile and an amide are converted to carboxylic acid by hydrolysis with aqueous acid.

Reaction 2:  CH3CH2C≡N H3O+
Reaction 3:  H3O+

Ammonium ion (NH4+) is a co-product of the reaction for both nitriles and primary amides (those having only hydrogen on the nitrogen).
 

Reactions 1 and 2 can be combined to convert a haloalkane to a carboxylic acid having an additional carbon atom.
Note that the overall process corresponds to introducting a CO2H group at the carbon originally bearing the halogen.

CH3CH2Br CH3CH2CN CH3CH2CO2H