A hydrocarbon is
a compound containing carbon,hydrogen and oxygen
sodium hydrogen carbonate
a compound containing carbon and hydrogen only
a compound containing carbon and oxygen only
Hydrocarbon is an organic compound made of nothing more than carbon and hydrogen.
Sugar is a compound which contains carbon, hydrogen, nitrogen and oxygen.