Are hydrocarbons compounds of hydrogen and carbon, or carbon and hydrogen?

Is it the same to say "Hydrocarbons are compounds of hydrogen and carbon." as saying "Hydrocarbons are compounds of carbon and hydrogen."
I got a B in my chemistry test just because of writing "hydrogen and carbon" instead of "carbon and hydrogen".


So i need to know if its the same and my teacher made the mistake or if it's me that made a mistake.




Rather, in a way, you have been both right.


*While there are subtle differences in context of [pragmatics](https://en.wikipedia.org/wiki/Pragmatics) as below, it should not be the bases of rejecting the answer. It rathers looks like the teacher deliberately marked it as wrong, as it did not literally matched the given answer.*


*IMHO, instead of asking, you should rather stand up for yourself and confront your teacher. The fact you had to ask about it is evidence of your failure to be confident in your knowledge.*


The right order *A and B* has two points of view(POV):


**POV of logic**: The order *A and B* is equivalent to *B and A*.


**POV of pragmatics**: A and B is usually used as "A is the main descriptor" while "B is the modifier". In similar sense as if A was a noun and B was a descriptive adjective.


* Organic compounds are primarily compounds of carbon.
* Not all carbon compounds are organic ones, but all organic compounds contain carbon.
* Most of organic compounds contain hydrogen, but not always.
* Typical exceptions are per-halogenated hydrocarbons, or [mellitic anhydride $\ce{C12O9}$](https://en.wikipedia.org/wiki/Mellitic_anhydride), containing just carbon and oxygen.
* It is therefore natural to start with carbon, when specifying a subclass of organic compounds.




---


So, primarily, in context of organic compounds, "Hydrocarbons are compounds of carbon and ....."


Now, hydrogen comes as the modifier, specifying *which* carbon compounds are hydrocarbons.


Therefore, "Hydrocarbons are compounds of hydrogen and carbon." is logically right, pragmatically not exactly wrong, but suboptimal and less usual.


 6