An alcohol is a hydrocarbon with a hydroxyl group. They have a general formula of CnH2n+1OHC_{n}H_{2n+1}OHCnH2n+1OH .