Step 1: Understanding the Concept:
The nitrite ion, \(\text{NO}_2^-\), is an ambident nucleophile. It can attack through oxygen to give an alkyl nitrite or through nitrogen to give a nitroalkane.
Step 2: Key Rule:
Ionic salts such as KNO2 and NaNO2 are largely ionic, so the more electronegative oxygen, which carries the free negative charge, attacks the carbon. Covalent salts such as \(\text{AgNO}_2\) attack through nitrogen, because the nitrogen lone pair is available.
Step 3: Detailed Explanation:
\[ \text{R-X} + \text{KNO}_2 \rightarrow \text{R-O-N=O} + \text{KX} \]
The product is an alkyl nitrite. With \(\text{AgNO}_2\) the product would be a nitroalkane, \(\text{R-NO}_2\).
Step 4: Why the other options are wrong.
Silver nitrite (A) gives the nitro compound. Silver cyanide (B) gives isocyanides (via N attack). Silver carboxylate (D) gives esters, \(\text{RCOOR}\).
Final Answer:
Potassium nitrite gives the alkyl nitrite, option (C).
\[ \boxed{\text{Potassium nitrite (C)}} \]