What are the tests used to confirm the presence of carbon dioxide and water, respectively, in the detection of carbon and hydrogen?