When a substance A reacts with water, it produces a combustible gas B and a solution of substance C in water. When another substance D reacts with this solution of C, it produces the same gas B on warming but D can produce gas B on reaction with dilute sulphuric acid at room temperature. A imparts a deep golden yellow colour to a smokeless flame of Bunsen burner: A, B, C and D respectively are