A sample of a substance containing only C and H burns in excess O2 to…