How do carbohydrates differ from hydrocarbons?
Easily by their structure of course...
Carbohydrates and hydrocarbons are both organic groups of molecules, which both contain carbon and hydrogen in them.
The main difference between these two classes of molecules is that hydrocarbons are only made of carbon and hydrogen, while carbohydrates contain carbon, hydrogen, and oxygen in them.
As such, an example of a hydrocarbon would be propane