Which gas is formed when any metal carbonate reacts with any acids ?

A) oxygen
B) carbon dioxide
C) hydrogen
D) methane