Hi there! :)
Both are compounds.
contains 1 carbon (C) atom and 2 oxygen (O) atoms.
It contains two different elements, so it is a COMPOUND.
is an IONIC compound with elements Sodium (Na) and Oxygen (O), which are different elements. Therefore, it is also a COMPOUND.