Definition

A carboxylic acid is a compound that is similar in structure to a carboxylic acid (RCOOH) but the OH group of the carboxylic acid has been replaced with a different group, Z, where Z is a heteroatom such as Cl, O, N, etc. Nitriles (R!C#N) are also considered to be carboxylic acid derivatives because they have the same oxidation state as carboxylic acids

Explanation

What’s important to note here that the carbon bonded to heteroatoms remains in the same oxidative state.