Dear Student,
Functional groups having two oxygen atoms are "ester" and "carboxylic acid".
Compound having molecular formula C2H4O2 has two possible functional isomers.
1. One is ethanoic acid or acetic acid (carboxylic acid)
2. Second is ismethyl methanoate (ester)
Best Regards