Answer:
The answer to your question is:
Step-by-step explanation:
When carbon attached to oxygen, they form covalent bonds, in these kind of bonds, atoms share electrons to acquire stability.
Atoms acquire stability when they have 8 electrons in their outermost shell.
When carbon share electrons with oxygen they acquire 8 electrons and they are stable.
See the picture below
Red is carbon and blue oxygen