They release CO2 (just like us, when we breathe). But, when plants are photosynthesizing. They release the oxygen through the same pores that allow the CO2 to enter their leaf cells.
Have you got the list of characteristics on you? If not, both contain cells with chloroplasts, which is used to carry out the photosynthesis. Hope this helps.