The general formula for alkenes is \( C_nH_{2n} \), where \( n \) represents the number of carbon atoms. Alkenes are hydrocarbons that contain at least one carbon-carbon double bond, and the formula \( C_nH_{2n} \) reflects the number of hydrogen atoms in relation to the carbon atoms, with two fewer hydrogens than the corresponding alkane (which has the formula \( C_nH_{2n+2} \)).
Thus, the correct formula for alkenes is B \( C_nH_{2n} \).